Code example for LocationManager

Methods: removeUpdates

0
   
  @Override 
  public void onPause() { 
    super.onPause(); 
     
    mgr.removeUpdates(onLocationChange);
  } 
   
  @Override 
  public void onDestroy() { 
    super.onDestroy(); 
     
    client.getConnectionManager().shutdown();
  } 
   
  private void updateForecast(Location loc) {
    String url=String.format(format, loc.getLatitude(),
                             loc.getLongitude());
    HttpGet getMethod=new HttpGet(url);
     
    try {