Code example for Parcel

Methods: writeLong, writeString, writeStringArray

0
        return 0; 
    } 
 
    @Override 
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeStringArray(mCommandsArray);
        parcel.writeLong(mStartTime);
        parcel.writeString(mStatus.toString());
        parcel.writeLong(mFinishTime);
    } 
 
    public static final Executable.Creator<Executable> CREATOR = new Executable.Creator<Executable>() {
        public Executable createFromParcel(Parcel in) { 
            return new Executable(in); 
        } 
 
        public Executable[] newArray(int size) { 
            return new Executable[size]; 
        } 
    };