How to delay/control Location permission request?
Sometimes you require to control location permission requests. To do this please follow these indications:
For iOS:
- Within the MOCAconfig.plist, if not present, add the field LOCATION_PERMISSION_REQUEST_MODE: and set it to Disabled. This will make MOCA not prompt for permissions (but also renders the location unusable).
- To prompt for the location permissions after loading up the MOCA components with the permission request disabled please use these commands:
[MOCA setProximityEnabled:YES]
[MOCA setGeoTrackingEnabled:YES]
For Android:
All permissions are managed by the custom App. When the MOCA process is called, it starts loading modules depending on the permissions granted to your custom application. If your custom app doesn't have the location permissions, MOCA will set .setProximityEnabled() and setGeoTrackingEnabled() to false. To be able to use location, request the permissions and, once granted, use both methods with the boolean true as parameter.
Related Articles
How the MOCA SDK geo-location tracking works?
Here's a diagram that draws the moving parts that involve location, and where our SDK comes into play: We rely strongly on the mobile device OS in order to gather precise and actionable locations.
How do I receive MOCA SDK actions in my third party API?
MOCA has a feature called Cloud-Hook. This feature enables the MOCA SDK embedded into the client mobile App to deliver location-triggered actions directly to the Third Party campaigns module and deliver segmented and personalized content to end ...
How Does MOCA Work?
There are billions of people generating location data every day and it is currently not used to personalize the customer experience. With MOCA, brands can get location insights and influence their customer behavior in real life by connecting web, ...
Strategies to improve battery usage of our SDKs
At MOCA we have designed our SDKs to be very efficient and use the minimum necessary battery for Proximity Marketing use cases. We prefer low energy solutions that do not involve GPS and, for Android, offer ways to fine tune the sensitivity of the ...
How do I use the MOCA REST API?
MOCA's REST API is a powerful tool to gather the data we have for your account, and process it at your end in order to get deeper insights into your data. The documentation for the REST API can be found here. It's extensive and covers all accessible ...