eygraber / compose-permissionx

Better Android permission management with Compose UI
MIT License
30 stars 1 forks source link

False PermanentlyDenied result in specific cases #13

Open mickele opened 5 days ago

mickele commented 5 days ago

As of Android 12 (IIRC), there's another action the user can take when they see the permission dialog: the back button.

Pressing back on the first time a permission dialog is shown, doesn't mean the user denied a permission (even though the permission will not be granted of course), as so, the flag shouldShowRationale will return false and the library will falsely identify it as "permanently denied".

I don't think it's possible to properly identify if the permission was permanently denied using the current Android APIs.

eygraber commented 5 days ago

There's a discussion about this happening in https://github.com/google/accompanist/pull/1793.

Currently waiting to hear back if there's any way to detect this state.