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
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
B. 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 redirect the user to the settings page but let's say I want to show a dialog. I could set openSettingsIfDenied to false but I have no way to discern between denied forever and just denied.
D. The library has no means to show the permission dialog after it was denied once. Which is when the permission rational would be shown. Also android returns when you should show this which the API should expose.
E. I failed this one because if someone denys once they will never see the dialog again.
Summary
I think these are the changes required for users of the library to implement permissions.
Keep showing the permission dialog if not denied forever
Be able to get back that google says to show permission rational. Also would be good if there was a way to pass that rational while requesting location and it shows that as a dialog. Could use this same rational for deny forever dialog.
Get back from response if denied vs denied forever
Let me know if you need any clarification.
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 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.
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
B. 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 redirect the user to the settings page but let's say I want to show a dialog. I could set openSettingsIfDenied to false but I have no way to discern between denied forever and just denied.
D. The library has no means to show the permission dialog after it was denied once. Which is when the permission rational would be shown. Also android returns when you should show this which the API should expose.
E. I failed this one because if someone denys once they will never see the dialog again.
Summary
I think these are the changes required for users of the library to implement permissions.
Let me know if you need any clarification.
The text was updated successfully, but these errors were encountered: