This is a very specific need I have. And there are reasons for it. The question is as simple as stated in the title: I have many activities in my project. But for activities DogActivity and CatActivity. I would like when DogActivity starts CatActivity, for CatActivity to see if as if called through onActivityResult as opposed to onCreate. Is this possible? Any example code?
EDIT
Two of the lifecycle methods of an activity that can be overridden are onCreate
and onActivityResult
. If CatActivity were to start DogActivity with startActivityForResult
, then naturally when DogActivity finishes, CatActivity's onActivityResult
method is called.
In my scenario, CatActivity is NOT the one that started DocActivity; on the contrary, I need DogActivity to start CatActivity. But when DogActivity starts CatActivity, I would have to have CatActivity behave as though DogActivity were returning to CatActivity's onActivityResult
. So instead of going through onCreate
, I want it to go through onActivityResult
. Hence my question: is that possible?