Activity A started B using startActivityForResult, and B started C using startActivity. After that, the activity stack is A B C.
Now suppose, C makes startActivity call on B using FLAG_ACTIVITY_REORDER_TO_FRONT flag, then the activity stack will become A C B.
My question is, now, if B finishes itself, will onActivityResult() in A be called due to B’s exiting?
Thanks.
Judging by the documentation for finish():
This leads me to believe that A will get B’s result even if C is in between the two.
Edit – after some testing I discovered some interesting interactions here.
The order of events, after some logging:
In other words, A gets B’s result as expected, but it happens after C finishes and A is resumed.