sl4a icon indicating copy to clipboard operation
sl4a copied to clipboard

Turn location setting on and off programmatically

Open bryomuch opened this issue 7 years ago • 3 comments

please help me turn on gps setting on and off without bothering the user

bryomuch avatar Jan 11 '18 19:01 bryomuch

I don't know the method to enable/disable GPS, I googled some keywords to know it but I could not find solutions without 'bothering the user'.

kuri65536 avatar Jan 14 '18 09:01 kuri65536

do you have a solution where,the user cant tap a single dialog window and thereby turning the location on or off?

bryomuch avatar Jan 19 '18 18:01 bryomuch

The program "Automate" can do it automatically ("Location provider set state" block), but it is not open source and requires some "special" permissions (android.permission.WRITE_SECURE_SETTINGS, which must be set over adb).

For the user way, just open the location settings page.

user202729 avatar Dec 15 '20 14:12 user202729