I have two Activities, say A1 and A2. sequence being A1->A2
From A1 I start A2 without calling finish() in A1.
After I press the back button in A2 I want to trigger a function in A1.
However, if I use onResume() in A1, the function is triggered even during the start of activity A1, which I want to avoid.
It should only be called during the ‘back’ press of A2.
I have two Activities, say A1 and A2. sequence being A1->A2 From A1 I
Share
Well start A2 with
startActivityForResultthen inA1 implement
in A2 override onBackPresset to set result before finishing the activity. Thats it.