阻止用户禁用GPS [英] Prevent user to disable GPS

查看:228
本文介绍了阻止用户禁用GPS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在使用Google API(融合位置提供商)来跟踪设备的位置,但我需要预防用户禁用GPS。我读了很多答案,但我发现的只有:不,不能做,根植设备或漏洞利用。一位朋友刚给我看了一个家长控制应用程序,无需root设备即可完成此操作。关于用户隐私等。代码将仅在公司的设备中使用,用户意识到这一点。



至少我需要一种方法来检测GPS已被停用以通知用户,顺便说一下,我在Google API中找不到对此的任何引用。



非常感谢提前。

Hi,

I'm using the Google API (Fused Location Provider) to track a device's location but I need to prevent the user from disabling the GPS. I read a lot of answers but all I've found is: No, can't do, rooting the device or bug exploits. A friend just showed me a parental control app that accomplishes this without having to root the device. About user privacy, etc. The code will be used only in company's devices with the users being aware of this.

At least I need a way to detect if the GPS has been deactivated to notify the user, by the way I can't find any reference to this in the Google API.

Thanks a lot in advance.

推荐答案

幸运的是,您无法阻止用户打开/关闭GPS。

这是他/她的设备和他/她的隐私.. 。

你应该做的是检查 GPS的当前状态 [ ^ ]并弹出消息如果你发现它,请让用户打开它......
Fortunately you can't prevent from user to turn GPS on/off.
It is his/her device and his/her privacy...
What you should do is checking the current status of the GPS[^] and pop a message to ask user to turn it on if you found it off...


这篇关于阻止用户禁用GPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆