以编程方式打开在Android /关闭GPS [英] Programmatically turn on/off GPS on Android
本文介绍了以编程方式打开在Android /关闭GPS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:结果
启用GPS编程像塔斯克
是否有可能以编程方式打开/关闭GPS在Android?正是在这个岗位SO提到:启用GPS编程像塔斯克的,它不能做未经用户同意的。
Is it possible to programmatically turn on/off gps on android? It is mentioned on this SO post: Enable GPS programatically like Tasker that it cannot be done without the user consent.
推荐答案
没有是不可能的。你可以得到最接近的是发射一个Intent,显示GPS设置给用户。请按照本指南:指南GPS意图的Android
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
这篇关于以编程方式打开在Android /关闭GPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文