Reputation: 6312
I have two situations
How could I identify these two situations separately? I think onRestart
and onResume
methods can't help me because both these methods will be called on both situation.
Upvotes: 0
Views: 703
Reputation: 847
To identify the two situation in your question, you can follow these steps:
startActivityForResult
to start other acitivities with requestCode >= 0onActivityResult
method in main activity to handle the event when you return back from other activity. setResult
in other activity before you want to return to the main acitivty.your second situation would not trigger onAcvitityResult
method.
Upvotes: 1