Code example for LocationListener

Methods: onLocationChanged

0
 
            String key = LocationManager.KEY_LOCATION_CHANGED; 
            Location location = (Location)intent.getExtras().get(key); 
 
            if (locationListener != null && location != null) 
                locationListener.onLocationChanged(location); 
 
            locationManager.removeUpdates(singleUpatePI); 
        } 
    }; 
 
    /** 
     * {@inheritDoc} 
     */ 
    public void setChangedLocationListener(LocationListener l) {
        locationListener = l;
    } 
 
    /** 
     * {@inheritDoc} 
     */