title: why is onLocationChanged() triggering at unpredictable times?
body: <p>I am targeting Android 1.6</p>
  
  <p>The LocationManager and listener are implemented within a Service</p>
  
  <p>requestLocationUpdates() is used as follows:</p>
  
  <pre><code>                locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 
                                                         //3 mins
                                                         Constants.LOCATION_UPDATE_PERIOD_MSEC,
                                                         //no distance is necessary
                                                         0,
                                                         locationListener);
  </code></pre>
  
  <p>The Location Manager and Listener are implemented as follows:</p>
  
  <pre><code>    locationManager = (LocationManager) getSystemService(GPS_Service.this.LOCATION_SERVICE);    
  
      locationListener = new GPSlocListener(mHandler, Constants.LOCATION_UPDATE_TIME, true);
  </code></pre>
  
  <p>my implementation of the LocationListener:</p>
  
  <pre><code>public class GPSlocListener implements LocationListener 
  {
      //constructor
      public GPSlocListener(Handler parentMsgHandler, long timeBetweenLocationEvents, boolean accuracyOverride)
      {
      //store passed-in values in member variables
      }
  
      public void onLocationChanged(Location loc)
      {
          Log.d(TAG, "onLocationChanged() called.");
  
          //process the data and send the location to the parentMsgHandler
      }
  
      public void onProviderDisabled(String provider)
      {
          // TODO Auto-generated method stub
      }
  
      public void onProviderEnabled(String provider)
      {
          // TODO Auto-generated method stub
      }
  
      public void onStatusChanged(String provider, int status, Bundle extras)
      {
          // TODO Auto-generated method stub
      }
  }
  </code></pre>
  
  <p>Sometimes onLocationChanged is triggered in 3 minute intervals, and sometimes at least 10 minutes can pass (possibly longer).
  I'll monitor the app and the little satellite icon shows up regularly. But, onLocationChanged() isn't reliably called.</p>
  
  <p>some logging info:</p>
  
  <pre><code>04-07 22:08:58.945: DEBUG/GpsLocationProvider(107): Acquiring wakelock
  04-07 22:08:59.186: DEBUG/libgps(107): report status : 3
  04-07 22:09:05.155: DEBUG/dalvikvm(228): GC_EXPLICIT freed 13 objects / 536 bytes in 88ms
  04-07 22:09:14.997: DEBUG/libgps(107): PDSM_PD_EVENT_UPDATE_FAILURE 
  04-07 22:09:15.005: DEBUG/libgps(107): report status : 2
  04-07 22:09:15.025: DEBUG/libgps(107): report status : 1
  04-07 22:09:16.035: DEBUG/libgps(107): report status : 4
  04-07 22:09:16.035: DEBUG/libgps(107): report status : 3
  04-07 22:09:16.035: DEBUG/libgps(107): report status : 3
  04-07 22:09:31.065: DEBUG/libgps(107): report status : 2
  04-07 22:09:31.125: DEBUG/libgps(107): report status : 1
  04-07 22:09:32.145: DEBUG/libgps(107): report status : 4
  04-07 22:09:32.145: DEBUG/libgps(107): report status : 3
  04-07 22:09:32.145: DEBUG/libgps(107): report status : 3
  04-07 22:09:47.165: DEBUG/libgps(107): report status : 2
  04-07 22:09:47.185: DEBUG/libgps(107): report status : 1
  04-07 22:09:48.195: DEBUG/libgps(107): report status : 4
  04-07 22:09:48.381: DEBUG/libgps(107): report status : 3
  04-07 22:09:48.381: DEBUG/libgps(107): report status : 3
  04-07 22:09:48.615: DEBUG/LocationManagerService(107): CdmaCellLocation Available
  04-07 22:09:48.625: VERBOSE/AlarmManager(107): Adding Alarm{46208250 type 2 com.google.android.apps.maps} Dec 13 12:46:54 pm
  04-07 22:09:51.855: DEBUG/LocationManagerService(107): CdmaCellLocation Available
  04-07 22:09:51.865: VERBOSE/AlarmManager(107): Adding Alarm{461e4e88 type 2 com.google.android.apps.maps} Dec 13 12:46:54 pm
  04-07 22:09:56.895: DEBUG/dalvikvm(206): GC_EXPLICIT freed 172 objects / 6912 bytes in 58ms
  04-07 22:09:58.915: VERBOSE/AlarmManager(107): Alarm triggering: Alarm{464f6cc8 type 2 android}
  04-07 22:09:58.925: DEBUG/GpsLocationProvider(107): ALARM_TIMEOUT
  04-07 22:09:58.925: DEBUG/GpsLocationProvider(107): stopNavigating
  04-07 22:09:58.925: DEBUG/libgps(107): qct_gps_stop
  04-07 22:09:58.925: DEBUG/libgps(107): report status : 2
  04-07 22:09:58.925: VERBOSE/AlarmManager(107): Adding Alarm{46540430 type 2 android} Jan 01 05:22:56 am
  04-07 22:10:00.965: DEBUG/libgps(107): report status : 4
  04-07 22:10:00.965: DEBUG/GpsLocationProvider(107): Releasing wakelock
  </code></pre>
  
  <p>and the permissions:</p>
  
  <pre><code>&lt;uses-sdk android:minSdkVersion="4" /&gt;
  
  &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
  &lt;uses-permission android:name="android.permission.LOCATION" /&gt;
  &lt;uses-permission android:name="android.permission.VIBRATE" /&gt;
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  </code></pre>
  
  <p>and to give you an idea, this is a typical result:</p>
  
  <pre><code>04-07 21:42:46.985: DEBUG/GPSlocListener(2582): onLocationChanged() called. 
  04-07 21:42:58.515: DEBUG/GPSlocListener(2582): onLocationChanged() called.
  04-07 21:45:14.825: DEBUG/GPSlocListener(2582): onLocationChanged() called. 
  04-07 21:48:14.865: DEBUG/GPSlocListener(2582): onLocationChanged() called. 
  04-07 21:48:26.205: DEBUG/GPSlocListener(2582): onLocationChanged() called.
  04-07 21:48:57.815: DEBUG/GPSlocListener(2582): onLocationChanged() called. 
  04-07 21:54:30.995: DEBUG/GPSlocListener(2582): onLocationChanged() called.
  04-07 21:54:42.375: DEBUG/GPSlocListener(2582): onLocationChanged() called. 
  04-07 21:54:54.395: DEBUG/GPSlocListener(2582): onLocationChanged() called. 
  </code></pre>