I m writing a simple GPS based app for location awareness. Whenever GPS is enabled, the app requests location updates and prints latitude and longitude in a TextView. If GPS is disabled, the location provider fall-backs to LocationManager.NETWORK_PROVIDER for triangulating device position relative to neighboring cell-towers. The aim is whenever device movement is detected, it should start populating the TextView with lat/long. When there is no movement, the process should stop. In order to do so, I ve implemented the location update rate as:
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 1, this);
The above line causes very frequent location updates (even when there is no movement, I keep getting lat/long values). I read somewhere that putting minTime=0 is not a good idea (battery drains faster). When I change it to 2 or 3 seconds, the update becomes very slow (even if the device moves more than 50 meters). Changing minDistance doesn t seem to work either! I want to know what settings does Google Maps application use? Power consumption is not a limiting factor for me as I m developing the app for some network drive test equipment (which gets constant power from vehicle s on-board lead acid battery).