Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.
Posted

1 solution

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...
 
Share this answer
 
Comments
[no name] 16-Mar-15 15:50pm    
5ed! I like to have devices do what I want.
Member 10205111 16-Mar-15 15:56pm    
Check MMGuardian in the app store?
Kornfeld Eliyahu Peter 16-Mar-15 16:12pm    
Thank you...
See my response about MMGuardian...
Member 10205111 16-Mar-15 15:51pm    
Check a parental control app called MMGuardian in the Google store, it allows to disable switching the GPS on/off without having to root the device. Also, I'm aware of privacy, users not liking the app, etc. but this is not for open commercial use but only for some field workers of a company an they are aware of this.

By the way not only we are building a tracking app but also the devices are provided by the company.
[no name] 16-Mar-15 16:00pm    
Alright, that's a different story then I guess. But I can't help you with that, I'm sorry.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900