How and when does Android record my location data

The last week we've all seen the havoc wreaked by the guys that uncovered how Apple tracks your location data. The funny thing is that Apple records the cell tower and WiFi data even if you turn off location services. Another "bug" in Apple's iOS is that it never stops recording the data. Now whenever something like this happens to Apple, it is their established policy to steer focus away from their problems. It happened with the antenna-gate scandal, when they started to showcase other cellphones that dropped signal when held a certain way. So people started talking about Android having the same issues. Now here is what I found after I started digging into this assumed problem.

First of all I installed an app called Android location cache viewer from the Android Market. This app requires root access, so don't bother installing it on an unrooted phone.

So the first question is how does Android record my location data? Well, the answer to that is this: It records the last 50 cell tower locations, and the last 200 WiFi locations.

The second question is when does Android record my location data? The answer to that one is: When you allow it to.

When I first booted up the Android I currently use for the first time, it asked me if I wanted to use the Location services. I didn't want to use them and so I unchecked the location services checkbox.

Now when I ran Android location cache viewer here is what I got:

So, rest assured that if you do not want the location services, there won't be any location data recording with Android.