title: How to stop the onLocationChanged() in my LocationListener
body: <p>How to stop the  onLocationChanged() in my   LocationListener , when i press the button ,the Toastbox in onLocationChanged keep coming out and can not stop even i leave the application. </p>
  
  <pre><code>Button btn_location =(Button) findViewById(R.id.button4);
  btn_location.setOnClickListener(new OnClickListener() {
  public void onClick(View v) { 
  
  
                 LocationManager mlocManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
                 LocationListener mlocListener = new MyLocationListener(); 
                 mlocManager.requestLocationUpdates( LocationManager.GPS_PROVIDER, 0, 0, mlocListener); 
          }
  
      });
  
   public class MyLocationListener implements LocationListener     {  
  
  
              public void onLocationChanged(Location loc)       
              {   
  
                  loc.getLatitude();         
                  loc.getLongitude();          
                  String Text = "My current location is: " +         "Latitud = " + loc.getLatitude() +         "Longitud = " + loc.getLongitude();          
                  Toast.makeText( getApplicationContext(), Text, Toast.LENGTH_SHORT).show();       
               }        
              public void onProviderDisabled(String provider)       
              {         
                  Toast.makeText( getApplicationContext(), "Gps Disabled", Toast.LENGTH_SHORT ).show();       
               }        
              public void onProviderEnabled(String provider)       
              {         
                  Toast.makeText( getApplicationContext(), "Gps Enabled", Toast.LENGTH_SHORT).show();       
               }        
              public void onStatusChanged(String provider, int status, Bundle extras)       
              {        
  
              }     
           } 
  </code></pre>