cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CSilva
Helper I
Helper I

Force User to Enable Location Services

Is there a way to force users to enable Location Services? I don't want any users to turn off location services while using an app remotely. 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@CSilva 

You can't force it (that would be a permission/privacy issue!), but you can exit your app if it is not turned on.  

Display a notice that it is required and then exit the app.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

3 REPLIES 3
RandyHayes
Super User
Super User

@CSilva 

You can't force it (that would be a permission/privacy issue!), but you can exit your app if it is not turned on.  

Display a notice that it is required and then exit the app.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
CSilva
Helper I
Helper I

Thank you. How do I make it exit the app if it is not turned on? 

RandyHayes
Super User
Super User

@CSilva 

I would simply take the user to a screen with the notification that they must enable location services. 

That screen, in addition to the notice, would have an Exit button.  

The OnSelect action of that button would be: Exit()

That will close the app.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,700)