Code example for LocationManager

Methods: removeGpsStatusListenerremoveUpdates

0
	 
    //=========== onDestroy =================== 
	/** Remove all location listeners */ 
    public void onDestroy() { 
    	super.onDestroy(); 
      	lm.removeUpdates(locationListenerNetwork);       // Remove Wifi location listener
		lm.removeUpdates(locationListenerGPS);           // Remove GPS location listener
	    lm.removeGpsStatusListener(mGpsStatusListener);  // Remove GPS status listener
		stopSelf();
    }; 
	 
	// ==========    GpsStatusListener ============================== 
    /** 
     *    Find status of GPS signal received: Satellites ok.  
     */ 
	public class GpsStatusListener implements GpsStatus.Listener {
		 
		@Override 
		public void onGpsStatusChanged(int event) {
			StringBuilder sbSats = new StringBuilder(512);
Stop searching for code, let great code find you!  Add Codota to your java IDE