Programmatically turn on/off GPS on Android [duplicate]

…衆ロ難τιáo~ 提交于 2019-12-10 18:20:40

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/12944378/programmatically-turn-on-off-gps-on-android

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!