Code example for Parcel

Methods: writeInt, writeLong, writeStringList

0
	 *  
	 * @param dest The Parcel in which the object should be written 
	 * @param flags Additional flags about how the object should be written 
	 */ 
    public void writeToParcel(Parcel dest, int flags) {
    	dest.writeInt(imageSharing ? 1 : 0);
    	dest.writeInt(videoSharing ? 1 : 0);
    	dest.writeInt(imSession ? 1 : 0);
    	dest.writeInt(fileTransfer ? 1 : 0);
    	dest.writeInt(csVideo ? 1 : 0);
    	dest.writeInt(presenceDiscovery ? 1 : 0);
    	dest.writeInt(socialPresence ? 1 : 0);
    	dest.writeLong(timestamp);
		if (extensions!=null && extensions.size()>0){
			dest.writeStringList(extensions);
		} 
    } 
 
    /** 
     * Parcelable creator 
     */