Parcel writeValue - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Parcel writeValue method.

This code example shows how to use the following methods:writeParcelable, writeString, writeValue
  public void writeToParcel(Parcel dest, int flags) {
    if (dest == null) {
      throw new RuntimeException("Parcel must not be null");
 
    } 
    dest.writeValue(id);
    dest.writeParcelable(user, flags);
    dest.writeString(body);
 
  } 
 
  private void readFromParcel(Parcel in) {
    final ClassLoader cl = getClass().getClassLoader();
 
    id = (Long) in.readValue(cl);
    user = in.readParcelable(cl);
    body = in.readString();
 
  } 
 
6
CodeRank
This code example shows how to use the following methods:writeInt, writeValue
		return 0; 
	} 
 
	@Override 
	public void writeToParcel(Parcel dest, int arg1) {
		super.writeToParcel(dest, arg1);
	    dest.writeInt(user_id);
		dest.writeValue(user);
	} 
 
	@Override 
	public void readFromParcel(Parcel in) {
	    super.readFromParcel(in);
		user_id = in.readInt();
		user = User.class.cast(in.readValue(User.class.getClassLoader()));
	} 
	 
	public void setUserId(int user_id) {
		this.user_id = user_id;
	} 
6
CodeRank
This code example shows how to use the following methods:writeInt, writeValue
		return 0; 
	} 
 
	@Override 
	public void writeToParcel(Parcel dest, int arg1) {
	    super.writeToParcel(dest, arg1);
		dest.writeInt(store_id);
		dest.writeValue(store);
	} 
 
	@Override 
	public void readFromParcel(Parcel in) {
	    super.readFromParcel(in);
		store_id = in.readInt();
		store = Store.class.cast(in.readValue(Store.class.getClassLoader()));
	} 
	 
	public void setStoreId(int store_id) {
		this.store_id = store_id;
	} 
6
CodeRank
This code example shows how to use the following methods:writeValue
		return 0; 
	} 
 
	@Override 
	public void writeToParcel(Parcel dest, int flags) {		
		dest.writeValue(mException);
	} 
 
	/** 
	 * @return the mException 
	 */ 
	public Exception getmException() {
		return mException;
	} 
} 
6
CodeRank
This code example shows how to use the following methods:writeList, writeString, writeValue
5
CodeRank
This code example shows how to use the following methods:writeInt, writeString, writeTypedList, writeValue
5
CodeRank
This code example shows how to use the following methods:writeList, writeString, writeValue
		return 0; 
	} 
 
	@Override 
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeValue(key);
		dest.writeString(translation.getInitials());
		CharSequence cs = spannableStringBuilder;
		dest.writeValue(cs);
		dest.writeList(boundaries);
	} 
	 
	public static final Parcelable.Creator<SwordBibleText> CREATOR = new Parcelable.Creator<SwordBibleText>() {
	 
		public SwordBibleText createFromParcel(Parcel in) { 
			return new SwordBibleText(in); 
		} 
 
		public SwordBibleText[] newArray(int size) { 
		    return new SwordBibleText[size]; 
5
CodeRank
This code example shows how to use the following methods:writeInt, writeString, writeValue
	} 
 
	@Override 
	public void writeToParcel(Parcel dest, int flags) {
		// TODO Auto-generated method stub 
		dest.writeValue( isConnectOnLaunch() );
		dest.writeString(name);
		dest.writeString(ip);
		dest.writeInt(port);
		dest.writeString(group);
		dest.writeString(nickname);
		dest.writeString(encoding);
		dest.writeString(password);
		dest.writeInt(status);
		 
	} 
	 
	/** 
	 * 
	 * Called from the constructor to create this 
5
CodeRank
This code example shows how to use the following methods:writeValue
	public static class Quit extends AbstractCall<String> {
		public final static String API_TYPE = "Application.Quit";
 
		@Override 
		public void writeToParcel(Parcel parcel, int flags) {
			super.writeToParcel(parcel, flags);
			parcel.writeValue(mResult);
		} 
 
		/** 
		 * Construct via parcel. 
		 */ 
		protected Quit(Parcel parcel) {
			super(parcel);
		} 
 
		/** 
		 * Generates instances of this Parcelable class from a Parcel. 
		 */ 
		public static final Parcelable.Creator<Quit> CREATOR = new Parcelable.Creator<Quit>() {
5
CodeRank
This code example shows how to use the following methods:writeString, writeValue
	 * @param parcel the Parcel in which the object should be written 
	 * @param flags additional flags about how the object should be written 
	 */ 
	@Override 
	public void writeToParcel(Parcel parcel, int flags) {
		parcel.writeString(mId);
		parcel.writeValue(mRequest.toString());
	} 
	@Override 
	public int describeContents() { 
		return 0; 
	} 
	 
	protected AbstractCall(Parcel parcel) {
		mId = parcel.readString();
		try { 
			mRequest = (ObjectNode)OM.readTree(parcel.readString());
		} catch (JsonProcessingException e) {
			Log.e(getName(), "Error reading JSON object from parcel: " + e.getMessage(), e);
		} catch (IOException e) {
5
CodeRank

Related Parcel writeValue Questions & Answers:

writeValue Method Overview
Flatten a generic object in to a parcel.
See Code Examples for other Android Parcel Methods: