-2

Possible Duplicate:
Enable GPS programatically like Tasker

I am making an app that shows gps icon as widget on home-screen. Now, i want to toggle GPS on or off when clicking this icon. I am stuck here. Any help?

Community
  • 1
  • 1
Amir Ansari
  • 209
  • 2
  • 2
  • See this thread, http://stackoverflow.com/questions/4721449/enable-gps-programatically-like-tasker – Mudassir Sep 20 '11 at 11:48
  • 1
    [What have you tried?](http://mattgemmell.com/2008/12/08/what-have-you-tried/) –  Sep 20 '11 at 11:49

1 Answers1

1

You cannnot turn on/off GPS in android, see How can I enable or disable the GPS programmatically on Android? or Is there way to programmatically enable GPS on Android 2.1 & above?

Summary is that you have to use a security hole or that you have to be a system application (application has to come within the system image). For standard apps it is not possible.

Community
  • 1
  • 1
ChrLipp
  • 15,526
  • 10
  • 75
  • 107