title: Android: Scenario where onPause is called but not onStop?
body: <p>I'm trying to understand the difference between onPause and onStop.</p>
  
  <p>I've read all the different forums but I still am not clear about the difference. I've created a simple app to try and test when which method gets called. For that I've simply placed loggers in each method.</p>
  
  <p>From my trials -</p>
  
  <ol>
  <li>Popups do not call either method</li>
  <li>Switching to another activity calls both methods</li>
  <li>Pulling down the notification bar calls neither method</li>
  </ol>
  
  <p>I've only seen either both methods being called in quick succession or neither getting called at all.
  I'm trying to find scenarios where onPause gets called but onStop doesn't.</p>
  
  <p>The purpose is to understand whether defining onPause is even required. If the scenarios in which only onPause gets called are so rare, it doesn't even make sense to write separate code for onPause. Shouldn't writing onStop be sufficient?</p>
  
  <pre><code>public class LifecycleActivity extends ActionBarActivity {
  
      @Override
      protected void onDestroy() {
          super.onDestroy();
          Log.d("Rachit", "In Destroy Method");
      }
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_lifecycle);
          Log.d("Rachit", "In Create Method");
      }
  
      @Override
      protected void onStart() {
          super.onStart();
          Log.d("Rachit", "In Start Method");
      }
  
      @Override
      protected void onResume() {
          super.onResume();
          Log.d("Rachit", "In Resume Method");
      }
  
      @Override
      protected void onPause() {
          super.onPause();
          Log.d("Rachit", "In Pause Method");
      }
  
      @Override
      protected void onRestart() {
          super.onRestart();
          Log.d("Rachit", "In Restart Method");
      }
  
      @Override
      protected void onStop() {
          super.onStop();
          Log.d("Rachit", "In Stop Method");
      }
  }
  </code></pre>