Re: [android-developers] Can startActivity() be called from any of the Activity lifecycle methods?

2011-05-04 Thread lbendlin
and it only gives "bad ideas" (tm) to people who try to keep their app alive despite the explicit user intent of terminating it. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googl

Re: [android-developers] Can startActivity() be called from any of the Activity lifecycle methods?

2011-05-03 Thread Dianne Hackborn
I strongly recommend not calling it from onStop() or onDestroy() -- those are called well after the user has left the activity, so if you are starting a new one at that point you have no idea what the state of the UI is at that point. There is actually no timeliness guarantee for these -- you know

[android-developers] Can startActivity() be called from any of the Activity lifecycle methods?

2011-05-03 Thread Eric
Of the lifecycle methods, like onCreate(), onStart(), onResume(), can startActivity() be called from inside those methods? If not, what would happen if you tried it? If so, how would calling startActivity() affect the current Activity's lifecycle? If you call startActivity() from onStart(), for