title: Is it possible to know if the app is starting after the user has force quit through settings?
body: <p>I want to know, probably in onCreate() of my activity, if the app was previously closed as per the normal home/back button or if the user actually went into the Android settings and selected force close.</p>
  
  <p>Is it possible to distinguish these two cases?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I think I might not have explained what I mean well enough.  I've read the activity lifecycle document and I understand that fairly well.</p>
  
  <p>Basically, I just want to know when the activity is created, whether or not the user has previously gone into the Android settings and hit force stop.  If the app was force stopped, I want to take an action (specifically, display the splash screen on startup).</p>
  
  <p>Lots of the answers below say that I can put a flag in onStop() or onDestroy(), and that these methods won't be called if the user hits force stop.  The problem is that these methods would have ALREADY been called before getting to that point, because of this sequence:</p>
  
  <ol>
  <li>app is in the active state, being used</li>
  <li>User hits back button (onStop(), onDestroy() called), or home button (onStop() called), or recent apps button (onStop() called)</li>
  <li>user goes into android settings, taps force stop</li>
  </ol>
  
  <p>In that situation, I will have put the flag into shared preferences on onStop(), but then the user hits force stop and the flag is still active in onCreate().</p>
  
  <p>I don't want to display the splash screen unless the user has hit force stop in settings.  I know this is not the way it <em>should</em> be done... but this decision was not made by me.</p>