1

For a project, I'm using permission_handler package for flutter. I can get location permission status and ask permission from user. However,when I try to revoke location permission from app settings, app crashes intantly. In logcat I'm getting;

Killing (package_name) (adj 700): permissions revoked

When I read similar threads, I saw its not a bug, it's a feature.How can I handle this situation with flutter?Or do I need to implement some native code?

1 Answer 1

5

Some permission settings cannot be changed while the App is running. This is by design.

Once you allow location permission if you revoke it while the app "thinks" that the permissions are given but you revoke it manually the processes that are supposed to run using that permission things break.

4
  • Nice & simple answer!
    – Dev4Life
    Jan 25, 2022 at 16:23
  • @Dev4Life Isn't there any way to handle it?
    – themmfa
    Jan 26, 2022 at 6:14
  • Let me reply you when I find a solution.
    – Dev4Life
    Jan 26, 2022 at 10:24
  • There is actually not a solution to this . You can have a workaround by asking the permission again and revoking it everytime the app starts up . Jan 26, 2022 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.