Code example for Parcel

Methods: writeByteArray, writeDouble, writeInt, writeParcelable, writeString

0
        return 0; 
    } 
 
    public void writeToParcel(Parcel out, int flags) {
    	super.writeToParcel(out, flags);
    	out.writeString(stringValue);
    	out.writeInt(integerValue);
    	out.writeDouble(doubleValue);
    	out.writeByteArray(binaryValue);
    	out.writeString((valueType == null) ? "" : valueType.name());
    	out.writeString(valueMetric);
    	out.writeParcelable((Parcelable) quality, flags);
    	out.writeString(sourceId);
    	out.writeInt(historyRecorded ? 1 : 0);
//    	out.writeBooleanArray(new boolean[]{historyRecorded}); 
    	 
    } 
 
    public static final Parcelable.Creator<ACtxAttribute> CREATOR = new Parcelable.Creator<ACtxAttribute>() {
        public ACtxAttribute createFromParcel(Parcel in) { 
            return new ACtxAttribute(in);