You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.
I have been evaluating the popular location permission libraries with flutter to see how it matches with the best practices. Below is what I found with your library. Let me know if there are ways to get this to work that I missed.
if (Location Services Disabled)
A) Show Location Services Dialog
else if (Location Services Enabled)
If(Permission Denied Forever)
B) Show Dialog that says permission denied forever and will show Settings
C) Redirect to app settings
else if(Denied Once && Permission Rational provided)
D) Show Permission Rational
Show Permission Dialog
else
E) Show Permission Dialog
So the library does not support
A. The library does not automatically show the location services enable dialog. This library does if you need a code reference https://github.com/loup-v/geolocation
B/C. So if permissions are denied forever I would think it would be best to show some sort of dialog before redirecting the user to the settings page. The library does not redirect the user to the settings page or show the dialog before as I think it should. So maybe when requesting permission we can pass this message and you show it in a dialog before going to the settings page. Also might want to expose the neverAskAgain like you have in here https://github.com/Baseflow/flutter-permission-handler/blob/develop/lib/src/permission_enums.dart
D. It would be great if when requesting permission that the permission rational could be passed in so your library would show the dialog and after they confirm they get taken to the grant page again.
Summary
I think these are the changes required for users of the library to implement permissions.
Show enable location services dialog when its disabled
Return denied forever from the permissions enum. Give developer option to redirect user to app settings if denied forever. Also show a dialog before redirecting to app settings that the developer can send in the text for.
Have permission rational be something we pass in when requesting permissions so the library can handle showing it and showing the grant permission dialog.
Platforms affected (mark all that apply)
📱 iOS
[X ] 🤖 Android
The text was updated successfully, but these errors were encountered:
Added a repo with Android and iOS examples of this best practice for review of how this works and for clarification and to validate things I said above are possible https://github.com/DavidCorrado/LocationPermissions
I'd like to upvote this proposal. I do not believe there is a trivial way to differentiate between 'denied once' and 'denied forever', which makes it difficult to show the appropriate modal dialogs/direct the user to the correct location to update their settings.
Are there any status updates on this proposal (and its sister proposal #31 )?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
🏗 Enhancement Proposal
I have been evaluating the popular location permission libraries with flutter to see how it matches with the best practices. Below is what I found with your library. Let me know if there are ways to get this to work that I missed.
Pitch
Android Best Practices
https://developer.android.com/distribute/best-practices/develop/runtime-permissions
https://developer.android.com/training/permissions/requesting
So below is my understanding of the best practices.
So the library does not support
A. The library does not automatically show the location services enable dialog. This library does if you need a code reference https://github.com/loup-v/geolocation
B/C. So if permissions are denied forever I would think it would be best to show some sort of dialog before redirecting the user to the settings page. The library does not redirect the user to the settings page or show the dialog before as I think it should. So maybe when requesting permission we can pass this message and you show it in a dialog before going to the settings page. Also might want to expose the neverAskAgain like you have in here
https://github.com/Baseflow/flutter-permission-handler/blob/develop/lib/src/permission_enums.dart
D. It would be great if when requesting permission that the permission rational could be passed in so your library would show the dialog and after they confirm they get taken to the grant page again.
Summary
I think these are the changes required for users of the library to implement permissions.
Platforms affected (mark all that apply)
The text was updated successfully, but these errors were encountered: