1. Website Introduction
2. Activity A Jump Acitvity B
A:onpause--b:oncreate---B:onstart, B:onresume---A:onsaveinstancestate
At this point, click the back key:
B:onpause--A:onrestart---A:onstart, A:onrusume---B:onstop
3. Activity A Jump Dialog activity B
A:onpause--B:oncreate-->b:onstart--and B:onresume--a:onsaveinstancestate
At this point, click the back key:
B:onpause--A:onresume--B:onstop-B:ondestory
4. System pop-up box such as "Low Battery"
No impact on current activity life cycle (Samsung mobile)
5. Suddenly call, SMS, lock screen, launch other apps (full screen), other apps (Dialog)
A:onpause--Onsaveinstancestate-OnStop
6. Press the back key and the home key to distinguish
If you press the back key at this point, the system returns to the desktop, followed by A:onpause, A:onstop, A:ondestroy.
If you press the home key (not the long Press), the system returns to the desktop and executes A:onpause-a:onstop in turn. Thus, the main difference between the back key and the home key is whether the OnDestroy will be executed.
At this point, if you press and hold the home button, different phones may pop up different content, the activity life cycle has not changed (measured by millet 2s, do not know whether the other phone will affect the activity life cycle).
Android Activity Life Cycle Overview