Code example for Parcel

Methods: writeInt, writeParcelable, writeString

0
            mActionIcon = p.readInt();
            mToken = p.readParcelable(getClass().getClassLoader());
        } 
 
        public void writeToParcel(Parcel out, int flags) {
            out.writeString(mMessage);
            out.writeString(mActionMessage);
            out.writeInt(mActionIcon);
            out.writeParcelable(mToken, 0);
        } 
 
        public int describeContents() { 
            return 0; 
        } 
 
        public static final Parcelable.Creator<Message> CREATOR = new Parcelable.Creator<Message>() {
            public Message createFromParcel(Parcel in) { 
                return new Message(in); 
            } 
 
            public Message[] newArray(int size) {