dpa99c/cordova-plugin-request-location-accuracy

Android runtime permission.

Closed this issue · 4 comments

Is this working for android 6.0+?

Yes

I'm having a problem because when I call the "canRequest" function using a device with android 6.0+ it does not show the permission dialog. Then I always get false as response.

On Android 6.0+ you must request run-time permission to use location before you can request an change in location accuracy mode with this plugin.

As documented, this plugin is designed to be used in conjunction with cordova-diagnostic-plugin so you should use requestLocationAuthorization() and isLocationAuthorized() to check/request location permission, before attempting to request a change in accuracy.

The example project gives an example of how this can be done.

Thank you a lot! 👍