http://developer.android.com/reference/android/app/Activity.html#isFinishing()
On Monday, March 4, 2013 11:14:29 PM UTC, latimerius wrote: > > Hello, > > I would like to be able to tell if Activity.onPause() was called because > the user is leaving the app, or simply because another Activity within the > same app is coming up. > > I have a main Activity and a PreferenceActivity. The main Activity needs > to handle onPause() differently depending on why it's called. If the user > is leaving the app, it needs to stop helper threads, close various things > like analytics session, deal with GL, save data to SD card etc. However, > if onPause() is just to display prefs most of that should happen, and a > bunch of other things should be done instead. > > I'm wondering if there's a framework-supported way to handle this, or at > least an idiomatic solution, as in a (semi)standard way of managing an > Activity with heavy set-up and tear-down? > -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

