3

Possible Duplicate:
Enable GPS programatically like Tasker

Is it possible to programmatically turn on/off gps on android? It is mentioned on this SO post: How can I enable or disable the GPS programmatically on Android? that it cannot be done without the user consent.

Community
  • 1
  • 1
ssk
  • 9,045
  • 26
  • 96
  • 169
  • 2
    Take a look at these: http://stackoverflow.com/questions/4721449/enable-gps-programatically-like-tasker http://stackoverflow.com/questions/5481695/how-to-enable-gps-in-android-coding http://stackoverflow.com/questions/5715257/enabling-gps-programatically-in-android http://stackoverflow.com/questions/10302894/ics-android-enable-gps-programmatically – Victor Ronin Oct 17 '12 at 22:42

1 Answers1

5

No it is not possible. The closest you can get is firing an Intent that shows the GPS settings to the user. Please follow this guide: Guide for GPS intent Android

MarchingHome
  • 1,184
  • 9
  • 15
  • 1
    it can actually be done by exploiting a certain loophole up to 2.2., but for others, see [Enable GPS programatically like Tasker – Richard Le Mesurier](http://stackoverflow.com/questions/4721449/enable-gps-programatically-like-tasker/5305835#5305835) – Amresh Jun 27 '13 at 07:20