Suppose there are two actions A and B and Activity A triggers activity B through startOnActivityResult (intent, 200) , then your activity goes to background and activity B (onCreate, onStart, onResume) depends on what you redefined.
Whenever your B call causes completion (), your activity B is destroyed, and action A comes to the fore. In this case now, i.e. Activity A, the call will be onActivityResult β onStart β onResume, but your onCreate will not be called, because it is called only when a certain Activity is called.
Suppose you did not call finish () from action B and call action A through intent, then you will only call onCreate ().
Also onActivityResult () is very useful when you want to preserve the value of your spinners or want to notify datasetchanged () your ListView of your first activity after the third activity event. You just need to check your resultCode from Activity in onActivityResult and complete your actions.
source share