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.
Comments
0 comments
Article is closed for comments.