Permission Status always return Denied.
🐛 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
Flutter version: 2.8.1
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.