I have application which i use broadcast receiver to check GPS status, like this Detecting GPS on/off switch in Android phones . It works well until i install and run the fake GPS app, i cannot detect GPS status anymore although i turn off the fake GPS.
Asked
Active
Viewed 289 times
0
-
in your settings, check mock location app that is used. Uninstall fake gps and try. – Rahul Ahuja Aug 16 '17 at 05:25
-
yes thanks, it should work well. But i just want to know if have any solution to get the GPS switching values in code in this case. – Hai nguyen Aug 16 '17 at 06:14
-
you mean you need to check if gps spoofing is on and is using some app for the same ? – Rahul Ahuja Aug 16 '17 at 12:23
-
@Rahull Ahuja: thanks! But I mean that i can listen the GPS on/off with broadcast receiver until I install the fake gps --> turn it on(need to turn on the Allow Mock Location in phone Setting) --> then I turn it off(dont Allow Mock Location in phone Setting) --> my app cannot listen the GPS on/off anymore. Do you why? and how's it resolved? – Hai nguyen Aug 18 '17 at 07:02