Android runtime permission.
Closed this issue · 4 comments
dielfilho-zz commented
Is this working for android 6.0+?
dpa99c commented
Yes
dielfilho-zz commented
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.
dpa99c commented
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.
dielfilho-zz commented
Thank you a lot! 👍