I have three activities : A , B, C. My application flow is : A -> B & B->A or A -> B & B ->C & C->A. So i used startActivityForResult to pass data from A to another activities and in A i also have onActivityResult to handle received data. In B, I change data and go to C by:
Intent intent = new Intent(this,C.class);
Bundle bundle = this.getIntent().getExtras();
bundle.putSerializable("newdatafromA", newdatafromA);
intent.putExtras(bundle);
startActivity(intent);
In C, I get data and change something. I try to setResult() with result code and go to A but it not success:
Intent positveActivity = new Intent(getApplicationContext(),A.class);
Bundle bundle = new Bundle();
bundle.putSerializable("newdata", newdata);
bundle.putSerializable("newdatafromA", newdatafromA);
positveActivity.putExtra("data", bundle);
setResult(2, positveActivity);
startActivity(positveActivity);
I debug and it dont jump to onActivityResult(I handle result code =2 in here) in A.class. and bundle have all data. Any idea to help me resolve it ?