flutter-permission-handler icon indicating copy to clipboard operation
flutter-permission-handler copied to clipboard

Permission Status always return Denied.

Open jlzapata opened this issue 4 years ago • 2 comments

🐛 Bug Report

Check Permission Status always returns denied when it should returns permanentlyDenied when the OS doesn't prompt the permission dialog anymore after deny multiple times the request.

Expected behavior

Returns permanentlyDenied when deny the request multiple times.

Reproduction steps

Request permission with Permission.storage.request and deny until the OS doesn't prompt the dialog anymore.

Configuration

Android Version: 11 RP1A.200720.011

Version: 8.3.0

Platform:

  • [ ] :iphone: iOS
  • [x] :robot: Android

jlzapata avatar Jan 30 '22 16:01 jlzapata

Flutter version: 2.8.1

jlzapata avatar Jan 30 '22 16:01 jlzapata

Hi @jlzapata,

This is expected behavior as Android doesn't provide this information to developers. When checking permissions Android will only return granted or denied and doesn't distinguish between permanently denied permission or denied and try again.

We used to have a workaround implemented but starting Android API 30 this was causing a whole new range of problems.

More information regarding this topic and a recommended sample can be found on our wiki page.

Since this is expected behavior I will close this issue now. Feel free to leave a comment if you have additional questions.

mvanbeusekom avatar Jan 30 '22 18:01 mvanbeusekom