You can indeed pass data back through an intent to an Activity's onActivityResult()
Activity E starting Activity A
final int RESULT_FOR_CLASS_DATA = 12; // pick a number to use
String returnedData;
Intent intent = new Intent(this, ActivityA.class);
startActivityForResult(intent, RESULT_FOR_CLASS_DATA);
Example in A (started from E)
Intent data = new Intent();
data.putExtra("ReturnData", dataToReturn);
setResult(RESULT_OK, data);
finish(); // returning to Activity E
Example in onActivityResult() of E
if (requestCode == RESULT_FOR_CLASS_DATA) {
returnedData = data.getStringExtra("ReturnData"));
}
There's a wide variety of ways to accomplish moving data around though so this is just one example.
To recommend an alternative, use Handler instead of this. Supposed that since the return Activity is paused, handler might require setting data in a separate class or global static variables, etc. and retrieved on Activity restart or something. So its possible to do with little to no code duplication in any class. Just retrieve and use. Whereas Intent requires code duplication in every class. It would also easily allow going from any Activity to any Activity like A->B->E->C instead of requiring E->A->E->B. Just something to think about.