Code example for LocationManager

Methods: removeGpsStatusListenerremoveUpdates

0
                    Log.i(TAG,"#########################################"); 
                    Log.i(TAG,"BestLocation finded return result to main. sat_count=" + sat_count); 
                    Log.i(TAG,"#########################################"); 
 
                    // removing all updates and listeners 
                    myLocationManager.removeUpdates(gpsLocationListener); 
                    myLocationManager.removeUpdates(networkLocationListener);     
                    myLocationManager.removeGpsStatusListener(gpsStatusListener); 
                    sat_count = 0; 
 
                    // send best location to locationResult 
                    locationResult.gotLocation(bestLocation); 
                } 
            } 
         } 
    }; 
 
    /** 
     * Determine if continue to try to find best location 
     */ 
    private Boolean needToStop(){