I find three cases which will call Android activity onStart()
function:
- Create a new activity,
onStart()
will follow behind onCreate - Press home button bring activity background and then bring it forward, it will also call
onStart()
, and it will follow behindonRestart()
. - Rotate the screen, the activity will
onPause()
,onStop()
,onDestroy()
and thenonCreate()
andonStart()
again.
I want to do some actions in onStart()
function in case1 while not do it in case2 or case3, anyone knows how to do it? Any help is appreciated! Thank you!