I have a view pager as a main activity with multiple fragments.
One of the fragments inside this view pager initiates another activity that does things and then finishes (think of it as picking a photo and then saving it to the database).
Once the second activity has finished, I call finish() and this brings me back to my previous fragment inside my view pager.
I however need to know if the activity that contained the view pager was started because the finish()
on the second activity was called to do something (load the photo for instance).
I don't know how to pass this information back to the previous activity and I would like to avoid using an Intent with the extra flag (CLEAR_ACTIVITY_TOP) as this would mean I'd have to recreate the state in every other view pager fragment.
Is this possible? Is there a way to find out which activity's finish()
caused the current activity to become active?
Many thanks,