How to toggle GPS from an Android appwidget? [duplicate]
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?
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.
精彩评论