Closed ravitejaavv closed 4 years ago
@ravitejaavv have you listed all the required permissions in your Info.plist
file?
You should add the following lines to your ios/Runner/info.plist
file (of course you provide more user friendly messages as part of the
<key>NSLocationWhenInUseUsageDescription</key>
<string>Need location when in use</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Always and when in use!</string>
<key>NSLocationUsageDescription</key>
<string>Older devices need location.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Can I haz location always?</string>
Check out the Info.plist
file in the example project here
@ravitejaavv have you listed all the required permissions in your
Info.plist
file?You should add the following lines to your
ios/Runner/info.plist
file (of course you provide more user friendly messages as part of the tags):<key>NSLocationWhenInUseUsageDescription</key> <string>Need location when in use</string> <key>NSLocationAlwaysAndWhenInUseUsageDescription</key> <string>Always and when in use!</string> <key>NSLocationUsageDescription</key> <string>Older devices need location.</string> <key>NSLocationAlwaysUsageDescription</key> <string>Can I haz location always?</string>
Check out the
Info.plist
file in the example project here
i have added only 2 permissions earlier. Its working fine now after adding all permissions
@ravitejaavv
I'm testing on emulator and I set my permission to Never from the setting of emulator. then I have added all the permission as you stated, but this will not opening that dialog.
Could please tell what would be the issue ? 🙃
@sanju-developer Setting the permissions to Never
means never ask me again for permissions. So it makes sense you don’t receive a dialog.
@mvanbeusekom You are correct.
Do you know any way to direct open location page in mobile setting from an flutter app ?
On iOS you can only open the App settings page. Other direct links are not allowed by Apple. On Android there are some more options but these are not yet supported by the location_permissions
plug-in.
To open the app settings you can use the openAppSettings
method of this plugin.
@mvanbeusekom ,
Okay cool, Thanks for sharing knowledge. I really don't know that apple don't allow to open direct link.
Ya for android I'm using
openAppSettings
BTW, then how Google Map, Ola and all open direct location page form their App.🧐
I don’t know how they do it, if you have any documentation or information I would gladly have a look at it and see if it fits in the plugin
Ya, I'm already struggling with it. If I find something surely will come back to you.
always executing onDenied() function
Version: 2.0.5
Platform: