I have written a code in C (sending commands to phone) to delete GPS data (eph, alm, time, position etc) on LG Phoenix phone and i am trying to test if the data has been deleted. What would be the best way to test it?
Asked
Active
Viewed 850 times
2 Answers
1
Call last the getLastKnownLocation() on the GPS provider and see if it returns anything.

Kurtis Nusbaum
- 30,445
- 13
- 78
- 102
-
i tried that.. but it doesn't seem to be helping. is there any other way to do it? – Angel Nov 04 '11 at 22:16
-
once i delete all the GPS data ...the time taken to get first fix is more but i always get the location (may be cached pos) but after deletion number of satellites user for fix will be zero. I know that my code is working but donno how to prove that. – Angel Nov 04 '11 at 23:07
-
Actually [`getLastKnownLocation()`](http://www.devdaily.com/java/jwarehouse/android/services/java/com/android/server/LocationManagerService.java.shtml) returns the last known location cached at the application layer, whereas s/he's cleaned out the satellite tracing data at the chipset level. – Reno Nov 05 '11 at 05:12
-
yes I get it now... thts the reason lastknownlocation is returned even after I delete GPS data. So how can I prove that tracing data is getting cleared now? – Angel Nov 07 '11 at 19:28
0
Different GPS chipsets stores this data in different locations, so you can never be sure. I don't know what chipset is used in your LG phone. Root your phone and browse the /data/
directory, usually you'll find something like /data/gps/
.
The external symptoms of deleting this data is that of a cold start. That is, if the device is not connected to the internet, and it is somewhere outside, it will take 2 minutes or longer to get a GPS fix. So that's how you'l know.

Reno
- 33,594
- 11
- 89
- 102