开发者

How to toggle GPS from an Android appwidget? [duplicate]

开发者 https://www.devze.com 2023-04-06 16:19 出处:网络
This question alread开发者_如何学编程y has answers here: Closed 11 years ago. Possible Duplicate:
This question alread开发者_如何学编程y has answers here: Closed 11 years ago.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消