Code example for Parcel

Methods: writeInt, writeString

0
        return 0; 
    } 
 
    @Override 
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(mId);
        dest.writeString(mName);
    } 
 
    public int getId() { 
        return mId;
    } 
 
    public String getName() {
        return mName;
    } 
}