smooth-app icon indicating copy to clipboard operation
smooth-app copied to clipboard

Permission ask goes into a loop

Open teolemon opened this issue 1 year ago • 13 comments

What

  • Permission ask goes into a loop
  • Probably related to #2742

Video

https://user-images.githubusercontent.com/1689815/183608551-d5af6edd-b53d-4034-b279-31edf3381d2a.mp4

teolemon avatar Aug 09 '22 08:08 teolemon

There is also an issue on iOS devices, where even if the permission is granted, the screen continues to ask for it.

g123k avatar Aug 09 '22 11:08 g123k

https://user-images.githubusercontent.com/1689815/184495530-db9897af-4652-4833-9cd2-3c4dfee0ee39.mp4

teolemon avatar Aug 13 '22 13:08 teolemon

Android device, after the fix for iOS

teolemon avatar Aug 13 '22 13:08 teolemon

I need reproducible steps please, because when I launch the app, the settings Activity launches as expected. And this not after the fix for iOS, as you've already mentioned this issue if I may

g123k avatar Aug 13 '22 14:08 g123k

Manually disabling permissions should suffice

teolemon avatar Aug 13 '22 14:08 teolemon

We might add a message on how to Reenable sibce after 3/4 denials, Android stops asking

teolemon avatar Aug 13 '22 14:08 teolemon

Also, not being able to open parameters screen is surprising

teolemon avatar Aug 13 '22 14:08 teolemon

I'm able to reproduce the issue, but I don't really understand it. It seems the Flutter side is OK.

However the native part doesn't launch the screen. I will open an issue on the plugin's tracker

g123k avatar Aug 15 '22 06:08 g123k

Meanwhile, is there a solution to enhance the user experience? So we don't have to wait for the plugin fix?

monsieurtanuki avatar Aug 15 '22 07:08 monsieurtanuki

Meanwhile, is there a solution to enhance the user experience? So we don't have to wait for the plugin fix?

You mean to create the dedicated screen to ask for the permission? Because here, it won't change anything

g123k avatar Aug 15 '22 07:08 g123k

I meant something like

  • OK, if we use this plugin we are supposed to ask for permission this way.
  • But it's not an obligation, we can call directly the standard 'ask permission' screen.
  • Doing so, we use the standards (less likely to bug), and hopefully the plugin will acknowledge the permission state

But maybe this suggestion is not relevant.

monsieurtanuki avatar Aug 15 '22 07:08 monsieurtanuki

This is what the plugin should do actually (they use the native Intent).

Calling the screen from our app would require developing the MethodChannel thing. Not that complicated, but since it's the goal of the permission, we should wait a little before taking any decision.

(From my understanding, it's a race condition in their code)

g123k avatar Aug 15 '22 07:08 g123k

For the record, there's a new version (10.0.0) of https://pub.dev/packages/permission_handler

monsieurtanuki avatar Aug 15 '22 07:08 monsieurtanuki

This issue was fixed a few releases ago

g123k avatar Oct 24 '22 13:10 g123k