The package doesn't ask for permission on Android. On calling Geolocator().checkGeolocationPermissionStatus() it immediately returns 'denied'. On iOS it works as intended.
The location does work with this pop up. With the same configuration.
The first time the permission status is checked, it should ask for permission with a pop up.
Using await Geolocator().checkGeolocationPermissionStatus() on Android does not show pop up.
Version: 4.0.2
Platform:
I'm having the same issue on both platform, android and iOS.
It doesn't prompt a permission dialog. Geolocator just returns .unknown on iOS and .denied on Android.
@DylandeWit, @njovy, the checkGeolocationPermissionStatus() method is not meant to show the popup. Its purpose is to silently check the current permissions granted.
If you want the show the permission popup you should call one of the methods to access the current location (e.g. getCurrentPosition(), getLastKnownPosition() or getPositionStream()). This will automatically request permissions if needed.
If you want more manual control you could use the methods on the Location Permissions plugin that comes with the Geolocator plugin (see the README for more information).
Thank you @mvanbeusekom ,
this is important though,
because sometimes we want to bring back location request-permission dialog after dismissed by user.
This should be mentioned in your plugin main READ.txt
Thank you
+1 if this work for iOS , it should works for Android too, would be a great feature.
@mvanbeusekom , The problem is this method returns wrong permission status at first time, it returns denied which is wrong and should be unknown.
@mvanbeusekom , The problem is this method returns wrong permission status at first time, it returns
deniedwhich is wrong and should beunknown.
Was this ever fixed?
@jovanovski this is working as intended (according to Android specifications) and thus will not be fixed.
Most helpful comment
@mvanbeusekom , The problem is this method returns wrong permission status at first time, it returns
deniedwhich is wrong and should beunknown.