Passing ArrayList<MyObject> Between multiple Activities

If you want to send an ArrayList of objects then your class must implement the Parcelable or Serializable interface .

See these good tutorials for sending custom object between Activities

http://androidideasblog.blogspot.in/2010/02/passing-list-of-objects-between.html

http://www.anddev.org/novice-tutorials-f8/simple-tutorial-passing-arraylist-across-activities-t9996.html


Use below code for pass arraylist in intent.

Intent mIntent = new Intent(FirstActivity.this, SecondActivity.class);
mIntent.putParcelableArrayListExtra("Data", mArraylist);
startActivity(mIntent);

Use below code For get arraylist from Intent.

Bundle bdl = getIntent().getExtras();
mArraylist1 = bdl.getParcelableArrayList("Data");

First you need to extend parcelable class in your Object class. Then you can pass it through intent via intent.putParcelableArrayListExtra("PASSING_DATA", data);

here data is arraylist of custom objects.

see Parcelable and Parcelable Tutorial for better undertanding