in some part of my application there is a structure of activities like this:
<
I know this is a really old question but I wanted to put in a valid solution, use onNewIntent()
and treat it as onActivityResult()
.
In activity D you would structure your intent as
Intent intent = new Intent(yourContext, Activity_A.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.putExtra("someName", data);
startActivity(intent);
finish();
and then in Activity_A
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
// update your UI
intent.getSerializableExtra(...
}