I have two activities, activity 1 and activity 2 for example. Activity 1 will call activity 2 and send an arraylist which will then be modified. This I have already done using an intent. What I now want to do, is when activity 2 calls finish() I want that modified arraylist to be sent back to activity 1 so that it has the most upto date version of that arraylist.
Activity 1:
Bundle b = new Bundle();
b.putParcelableArrayList("com.Woody.RingerSchedule", schedules);
Intent i = new Intent(this, addSchedule.class);
i.putExtras(b);
startActivity(i);
Activity 2 so far:
Bundle b = getIntent().getExtras();
final ArrayList<Schedule> schedules = b.getParcelableArrayList("com.Woody.RingerSchedule");
//modify arraylist
//need code here to return arraylist to activity 1
finish();
Any help appreciated.