[英]How to? Code Android App to Change user's LOCATION SETTING to OFF?
quick Android Development question on how to Code something! 快速的Android开发有关如何编写代码的问题!
I've searched for it, but the results are always messy, so I cant seem to find what I need. 我已经搜索过了,但是结果总是混乱的,所以我似乎找不到我需要的东西。
Any help is greatly appreciated.. 任何帮助是极大的赞赏..
How would I write the Code to: Turn the user's "Location" Setting to "OFF"..? 我将如何编写代码以:将用户的“位置”设置设为“关”。
For example, in the same way that all of the "settings toggle buttons" homescreen widgets would do it, I assume - although i'm implementing it differently than that. 例如,我以所有“设置切换按钮”主屏幕小部件都可以使用的方式相同,尽管我实现的方式与此不同。
I simply just need the raw code that turns LOCATION to OFF. 我只需要将LOCATION设置为OFF的原始代码即可。
Also , what permissions would I need to add in my Manifest?
另外 ,我需要在清单中添加哪些权限?
THANKS IN ADVANCE! 提前致谢! :)
:)
How would I write the Code to: Turn the user's "Location" Setting to "OFF"..?
我将如何编写代码以:将用户的“位置”设置设为“关”。
You don't, except perhaps on rooted devices or as a system app (ie, pre-installed by the manufacturer). 您不需要,除非是在有根设备上或作为系统应用程序(即,由制造商预先安装)。 Ordinary apps have no ability to change the user's location settings directly.
普通应用无法直接更改用户的位置设置。
all of the "settings toggle buttons" homescreen widgets would do it
所有“设置切换按钮”主屏幕小部件都可以做到这一点
Only on rooted devices, or those that are supplied by the device manufacturer for their device. 仅在已root用户的设备上,或在设备制造商为其设备提供的设备上。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.