title: Is Activity.onStop() guaranteed to be called (API 11 +)
body: <p>It is unclear (to me, at least) from the documentation whether Activity.onStop is guaranteed to be called. There are two places with seemingly contradictory information.</p>
  
  <ol>
  <li>Javadoc for Activity.onStop:</li>
  </ol>
  
  <blockquote>
    <p>Note that this method may never be called, in low memory situations where the system does not have enough memory to keep your activity's process running after its onPause() method is called.</p>
  </blockquote>
  
  <ol start="2">
  <li>Documentation (in particular 'Killable' column) for Activity class <a href="http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle">http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle</a>:</li>
  </ol>
  
  <blockquote>
    <p>Starting with Honeycomb, an application is not in the killable state until its onStop() has returned. This impacts when onSaveInstanceState(Bundle) may be called (it may be safely called after onPause() and allows and application to safely wait until onStop() to save persistent state.</p>
  </blockquote>
  
  <p>It's a bit of a struggle to find a way that both pieces of documentation are telling the truth. The only scenario I can think of is this: Suppose you are developing on target API 21 (with min sdk 10) and write an Activity with an onStop() method. If you then run this application on an API 10 phone, onStop() is not guaranteed to be called. This scenario means that the documentation from points 1. and 2. above are both true. Otherwise, one of them must be false.</p>