How do I force a permission to be granted?

I want the user should give the permission of location or else the app will close, how to do it ??
If he grants he can proceed or else the app closes..


Use the "Permission Denied" block from the Screen blocks drawer.

1 Like

WOW that worked great, a issue here that it only ensures that user is providing location when app launches but if the user closes the location after 2 minutes, then how to show him the dialog box again ?

The method above is for location permissions. When you allow permissions in the app then go to app settings and disable locating permissions, the app will reset and restart asking for permissions again.
If you are writing about a location service, however, it is completely different. Best to record the screen and show what you mean, demonstrate the problem. Then we will come up with a solution.

Even If I give permission in the pop up the location is showing lat n long 0,0 n when im manually going to setting n swithing on location then it showing me my true location. I want to force user to turn on location manually if pop up not working even if i allow location in pop up. im using android 12

To ask for location permission and enable locations are 2 different things

You can use the following blocks to open the location settings for the user