Code example for LocationListener

Methods: onStatusChanged

0
  @Override 
  public void onStatusChanged( final String provider, final int status, final Bundle extras ) {
    ListActivity.info("provider status changed: " + provider + " status: " + status);
         
    if ( mapLocationListener != null ) {
      mapLocationListener.onStatusChanged( provider, status, extras );
    } 
  } 
 
  /** newLocation can be null */ 
  private void updateLocationData( final Location newLocation ) {
    final LocationManager locationManager = (LocationManager) listActivity.getSystemService(Context.LOCATION_SERVICE);
    // see if we have new data 
    gpsStatus = locationManager.getGpsStatus( gpsStatus );
    final int satCount = getSatCount();
     
    boolean newOK = newLocation != null;
    final boolean locOK = locationOK( location, satCount );
    final long now = System.currentTimeMillis();
     
Stop searching for code, let great code find you!  Add Codota to your java IDE