Android App crashes when disabling the location permission from settings?

2k views Asked by At

I am working on Xamarin Android Application. I have asked a location permission from my app which if I enable from the app works properly. But when i put the app in background and go to settings and disable the location permission and start the app again, the app crashes. What could be the possible solution to this problem?

1

There are 1 answers

3
Vinay On

From Android M Android Required some permission at Run time like Location permission. when you disable that permission from settings then when app running on background it not found that permission to access GPS in background.That's why app crash. to avoid app crash show some message when permission declined and Handle Exception using try catch block.

Read more about android Run time permission from here