阻止用户禁用GPS(Prevent user to disable GPS)

150 IT屋

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.

解决方案
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...

嗨,



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



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



非常感谢提前。

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

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

你应该做的是检查 GPS的当前状态 [ ^ ]并弹出消息如果你发现它,请让用户打开它......

本文地址:IT屋 » 阻止用户禁用GPS