Example usage for android.os Parcel writeString

List of usage examples for android.os Parcel writeString

Introduction

In this page you can find the example usage for android.os Parcel writeString.

Prototype

public final void writeString(String val) 

Source Link

Document

Write a string value into the parcel at the current dataPosition(), growing dataCapacity() if needed.

Usage

From source file:net.exclaimindustries.geohashdroid.util.KnownLocation.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    // Nice how this is easily parcelable.
    dest.writeString(mName);
    dest.writeParcelable(mLocation, 0);/*  w w w  . ja v  a 2 s  .  c  om*/
    dest.writeDouble(mRange);
    dest.writeByte((byte) (mRestrictGraticule ? 0 : 1));
}

From source file:net.issarlk.androbunny.inkbunny.Submission.java

public void writeToParcel(Parcel out, int flag) {
    out.writeLong(Submission.serialVersionUID);
    out.writeInt(this.id);
    out.writeInt(this.hidden);
    this.user.writeToParcel(out, 0);
    out.writeString(this.create_datetime);
    out.writeString(this.create_datetime_usertime);
    out.writeString(this.file_name);
    out.writeInt(this.thumbnails.length);
    for (int i = this.thumbnails.length - 1; i >= 0; i--) {
        if (this.thumbnails[i] != null) {
            out.writeInt(1);/*from   ww w  . j av  a 2 s .  c  om*/
            this.thumbnails[i].writeToParcel(out, 0);
        } else {
            out.writeInt(0);
        }
    }
    out.writeString(this.title);
    out.writeInt(this.deleted);
    out.writeInt(this.s_public);
    out.writeString(this.mimetype);
    this.rating.writeToParcel(out, 0);
    this.submission_type.writeToParcel(out, 0);
    out.writeInt(this.digitalsales);
    out.writeInt(this.printsales);
    out.writeInt(this.guest_block);

    // Full info
    if (this.keywords != null) {
        out.writeInt(1);
        out.writeInt(this.keywords.length);
        for (int i = this.keywords.length - 1; i >= 0; i--) {
            this.keywords[i].writeToParcel(out, 0);
        }
        out.writeInt(this.scraps);
        out.writeInt(this.favorite);
        out.writeInt(this.favorites_count);
        out.writeInt(this.comments_count);
        out.writeInt(this.files.length);
        for (int i = this.files.length - 1; i >= 0; i--) {
            this.files[i].writeToParcel(out, 0);
        }
        out.writeString(this.file_urls[FULL].toString());
        out.writeString(this.file_urls[SCREEN].toString());
        out.writeString(this.file_urls[PREVIEW].toString());
    } else {
        out.writeInt(0);
    }

    //Description      
    if (this.description != null) {
        out.writeInt(1);
        out.writeString(this.description);
    } else {
        out.writeInt(0);
    }

    //Writing
    if (this.writing != null) {
        out.writeInt(1);
        out.writeString(this.writing);
    } else {
        out.writeInt(0);
    }
}

From source file:io.bunnyblue.noticedog.app.notifications.Notification.java

public void writeToParcel(Parcel out, int flags) {
    out.writeString(this.packageName);
    out.writeInt(this.id);
    out.writeString(this.tag);
    out.writeString(this.key);
    out.writeLong(this.when);
    out.writeInt(this.smallIcon);
    out.writeParcelable(this.largeIcon, 0);
    out.writeString(this.tickerText);
    out.writeString(this.contentTitle);
    out.writeString(this.contentText);
    out.writeString(this.contentInfoText);
    out.writeParcelable(this.expandedLargeIconBig, 0);
    out.writeString(this.expandedContentTitle);
    out.writeString(this.expandedContentText);
    out.writeStringList(this.expandedInboxText);
    out.writeList(this.people);
    out.writeParcelable(this.picture, 0);
    out.writeInt(this.priority);
    out.writeParcelable(this.pendingLaunchIntent, 0);
    out.writeList(this.actions);
    logParcelSize(out);/*from www.ja  va  2 s.  co  m*/
}

From source file:com.amossys.hooker.common.InterceptEvent.java

/**
 * Write to the parcel to build the class.
 *///from w  w w  .  j  av  a 2  s  . co m
@Override
public void writeToParcel(Parcel out, int flags) {
    out.writeString(idEvent.toString());
    out.writeString(IDXP);
    out.writeLong(timestamp);
    out.writeLong(relativeTimestamp);
    out.writeString(hookerName);
    out.writeInt(intrusiveLevel);
    out.writeInt(instanceID);
    out.writeString(packageName);
    out.writeString(className);
    out.writeString(methodName);

    writeParametersList(out);
    writeReturnsEntry(out);
    writeDataMap(out);
}

From source file:cx.ring.model.CallContact.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeLong(id);/*from   w w w.  ja va 2s  .  c  o  m*/
    dest.writeString(key);
    dest.writeString(mDisplayName);
    dest.writeLong(photo_id);
    dest.writeTypedList(phones);
    dest.writeString(mEmail);
    dest.writeByte((byte) (isUser ? 1 : 0));
    dest.writeByte(stared ? (byte) 1 : (byte) 0);
}

From source file:de.schildbach.wallet.data.PaymentIntent.java

@Override
public void writeToParcel(final Parcel dest, final int flags) {
    dest.writeSerializable(standard);/*ww  w.  ja v  a2  s . c o  m*/

    dest.writeString(payeeName);
    dest.writeString(payeeVerifiedBy);

    if (outputs != null) {
        dest.writeInt(outputs.length);
        dest.writeTypedArray(outputs, 0);
    } else {
        dest.writeInt(0);
    }

    dest.writeString(memo);

    dest.writeString(paymentUrl);

    if (payeeData != null) {
        dest.writeInt(payeeData.length);
        dest.writeByteArray(payeeData);
    } else {
        dest.writeInt(0);
    }

    dest.writeString(paymentRequestUrl);

    if (paymentRequestHash != null) {
        dest.writeInt(paymentRequestHash.length);
        dest.writeByteArray(paymentRequestHash);
    } else {
        dest.writeInt(0);
    }
}

From source file:fr.free.nrw.commons.Media.java

/**
 * Creates a way to transfer information between two or more
 * activities./*from ww w.  j  av a2s .c  om*/
 * @param parcel Instance of Parcel
 * @param flags Parcel flag
 */
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeParcelable(localUri, flags);
    parcel.writeString(thumbUrl);
    parcel.writeString(imageUrl);
    parcel.writeString(filename);
    parcel.writeString(description);
    parcel.writeLong(dataLength);
    parcel.writeSerializable(dateCreated);
    parcel.writeSerializable(dateUploaded);
    parcel.writeString(creator);
    parcel.writeSerializable(tags);
    parcel.writeInt(width);
    parcel.writeInt(height);
    parcel.writeString(license);
    parcel.writeStringList(categories);
    parcel.writeMap(descriptions);
}

From source file:com.marianhello.bgloc.Config.java

public void writeToParcel(Parcel out, int flags) {
    out.writeFloat(getStationaryRadius());
    out.writeInt(getDistanceFilter());/* w  ww.j av  a2 s.  co  m*/
    out.writeInt(getDesiredAccuracy());
    out.writeValue(isDebugging());
    out.writeString(getNotificationTitle());
    out.writeString(getNotificationText());
    out.writeString(getLargeNotificationIcon());
    out.writeString(getSmallNotificationIcon());
    out.writeString(getNotificationIconColor());
    out.writeValue(getStopOnTerminate());
    out.writeValue(getStartOnBoot());
    out.writeValue(getStartForeground());
    out.writeInt(getLocationProvider());
    out.writeInt(getInterval());
    out.writeInt(getFastestInterval());
    out.writeInt(getActivitiesInterval());
    out.writeValue(getStopOnStillActivity());
    out.writeString(getUrl());
    out.writeString(getSyncUrl());
    out.writeInt(getSyncThreshold());
    out.writeInt(getMaxLocations());
    Bundle bundle = new Bundle();
    bundle.putSerializable("httpHeaders", getHttpHeaders());
    out.writeBundle(bundle);
}

From source file:org.jorge.lolin1.func.champs.models.Champion.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    Field[] declaredFields = Champion.class.getDeclaredFields();
    try {/*from w w  w.j a  va2 s.c  om*/
        for (Field x : declaredFields) {
            Class<?> thisType = x.getType();
            if (thisType == String.class) {
                x.setAccessible(Boolean.TRUE);
                dest.writeString(x.get(this).toString());
                x.setAccessible(Boolean.FALSE);
            }
        }
    } catch (IllegalAccessException e) {
        Crashlytics.logException(e);
    }
    dest.writeStringArray(tags);
    dest.writeStringArray(skins);
    dest.writeParcelable(this.passive, flags);
    dest.writeParcelableArray(this.spells, flags);
}

From source file:com.kevinquan.android.location.SimpleRecordedLocation.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeDouble(mLatitude);/*  w w  w . ja  v  a  2 s  .c om*/
    dest.writeDouble(mLongitude);
    dest.writeFloat(mAccuracy);
    dest.writeDouble(mAltitude);
    dest.writeFloat(mBearing);
    dest.writeFloat(mSpeed);
    dest.writeLong(mRecordedAt);
    dest.writeString(mProvider.toString());
}