I'm developing a location logging application that saves a phone location each second.
I've implemented a service that subscribes to LocationManager updates:
HandlerThread thread = new HandlerThread("LocationServiceHandler");
locationManager.requestLocationUpdates(GPS_PROVIDER,
1000 /* milliseconds*/, 0 /* meters */, listener, thread.getLooper());
The service started by binding to an application context.
Application usually runs in a background and doesn't requires any user interaction.
Generally it works OK when I'm walking around my building - the service gets a new location+timestamp each second and stores it to a file located at external storage.
But when I'm getting to an open field away from a city, I found a 4-5 minutes gaps between records in a log file. I can say for sure that the phone wasn't in use at that moment and it was under the open sky, nothing visible was blocking a satellites. It happens irregularly, aprox once a hour and I can't reproduce this behavior at my office.
Any ideas, what might cause that? How can it be avoided?
The phone is Nexus S, Android 2.3.4