Android Question Access to GPS location (checkbox)

T201016

Active Member
Licensed User
Longtime User
Hello!
I have enough prosaic question.

How to turn off programmatically in the "location service" menu - access to my GPS location. You are about to uncheck the box (CheckBox). Android version system 4.3

I will be grateful for your response.
Regards.
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
You can not programatically en- or disable this setting. It is in the decision of the user to do so (or not).
You can point the User to the right settingsdialog... I think a similar call is in the GPS tutorial

B4X:
 If Starter.GPS1.GPSEnabled = False Then
     ToastMessageShow("Please enable the GPS device.", True)
     StartActivity(Starter.GPS1.LocationSettingsIntent) 'Will open the relevant settings screen.
   Else
     Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_ACCESS_FINE_LOCATION)
   End If
 
Upvote 0

T201016

Active Member
Licensed User
Longtime User
You're right DonManfred, to the same I finally came to the conclusion ...
Thank you for the tip.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…