Code example for LocationListener

Methods: onLocationChanged

0
 
	public void registerForUpdates(LocationListener observer) {
		mObservers.add(observer);
 
		if (mDeviceLocation != null) {
			observer.onLocationChanged(mDeviceLocation);
		} 
	} 
 
	public void registerForStatusUpdates(LocationListener observer) {
		mStatusObservers.add(observer);
	} 
 
	public void deregister(LocationListener observer) {
		mObservers.remove(observer);
	} 
 
	/** 
	 * Returns the last known current location. 
	 *  
	 * @return location