This is fine. As long as Activity B is still running it will not trigger anything back to A until it finishes.
Launching A -> B -> C and then closing C will mean B's onActivityResult
will trigger, then closing B will trigger A's onActivityResult
.
So in Activity B you will need some logic like:
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == ACTIVITY_C && resultCode == RESULT_XXX) {
// Get the result from C, etc. Whatever you need to do
String stuff = data.getStringExtra("XXX");
Intent output = new Intent();
output.putExtra(XXX, stuff);
setResult(RESULT_XXX, output);
finish();
}
}
Then you can catch that back in Activity A.
Another option: if you find yourself needing to share data across a lot of activities and the logic seems to be getting complicated, you might like to consider using the Application class to store global state that you can access from all activities.