Parcelable data returning null
<p>I have the following three classes.</p>

<p><strong>Cricketers</strong></p>

<pre><code> public class Cricketers implements Parcelable {

        private String name;
        private String address;
        private int age;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public int getAge() {
            return age;
        }

        public void setAge(int age) {
            this.age = age;
        }


        @Override
        public int describeContents() {
            return 0;
        }

        public Cricketers() {
        }

        @Override
        public void writeToParcel(Parcel dest, int flag) {
            dest.writeString(name);
            dest.writeString(address);
            dest.writeInt(age);
        }

        public Cricketers(Parcel in) {
            this.name = in.readString();
            this.address = in.readString();
            this.age = in.readInt();
        }

        @SuppressWarnings("unchecked")
        public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
            public Cricketers createFromParcel(Parcel in) {
                return new Cricketers(in);
            }

            public Cricketers[] newArray(int size) {
                return new Cricketers[size];
            }
        };
    }
</code></pre>

<p><strong>Activity1</strong></p>

<pre><code>public class Activity1 extends Activity {

    private ArrayList&lt;Cricketers&gt; cricketers;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        cricketers = new ArrayList&lt;Cricketers&gt;();

        Cricketers object = new Cricketers();
        object.setName("Sachin");
        object.setAddress("Mumbai");
        object.setAge(37);
        cricketers.add(object);

        Cricketers object1 = new Cricketers();
        object1.setName("Sourav");
        object1.setAddress("Kolkata");
        object1.setAge(38);
        cricketers.add(object1);

        Cricketers object2 = new Cricketers();
        object2.setName("Dravid");
        object2.setAddress("Bengaluru");
        object2.setAge(38);
        cricketers.add(object2);

        Intent intent = new Intent(this, Activity2.class);
        intent.putExtra("cricketers", cricketers);
        startActivity(intent);

        cricketers = null;

    }
</code></pre>

<p><strong>Activity2</strong></p>

<pre><code>public class Activity2 extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        Intent intent = getIntent();
        Bundle bundle = intent.getExtras();

        Cricketers cricketers = bundle.getParcelable("cricketers");

    }

}
</code></pre>

<p>I am retrieving the data on Activity2 , but its returning cricketers = null .</p>

<p>Within the Activity1 class , the data "cricketers" is being properly added to the Intent.</p>

<p>Kindly provide your inputs.</p>

<p>Thanks in advance.</p>

<p>Warm Regards,</p>

<p>CB</p>
