title: can we stop LocationListener using onPause() method in android
body: <p>I am trying to stop LocationListener in GPS app when device stops moving and again i want to start it when device starts to move, </p>
  
  <p>So i wanted to know, if device is not moving then does it call onPause() method dirctly from onLocationChanged()? because in my onPause() method i have written following code to stop LocationListener</p>
  
  <pre><code>    @Override
      public void onPause(){
  
       super.onPause();
       locationManager.removeUpdates(this);
          locationManager = null;
         }  
  </code></pre>