in the The Activity consists of 7 commonly used periodic functions, namely:
(i)onCreate called when the Activity object was first created
Note: from another The function is not called when activity returns to the previous activity
(ii)OnStart Call this function when Activity becomes visible
(iii)Onresume Call this method when Activity starts preparing to interact with the user
Note: can also be understood as The activity is loaded, and the user does not have a function called to the activity operation
(iv)OnPause method to be called when the system is about to start another Activity
(v) Call this method when the current Activity becomes invisible onStop
(vi)OnDestroy The method will be called before the current Activity is destroyed
Note: OnDestroy is always behind onStop when doing a back-up operation.
(vii)Onrestart This method will be called before an Activity is started again
PS: For app testing I usually use some of the online test platforms:
Android activity Common life cycle functions