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:com.eTilbudsavis.etasdk.model.Catalog.java

public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.mErn);
    dest.writeString(this.mLabel);
    dest.writeValue(this.mBackground);
    dest.writeLong(mRunFrom != null ? mRunFrom.getTime() : -1);
    dest.writeLong(mRunTill != null ? mRunTill.getTime() : -1);
    dest.writeInt(this.mPageCount);
    dest.writeInt(this.mOfferCount);
    dest.writeParcelable(this.mBranding, flags);
    dest.writeString(this.mDealerId);
    dest.writeString(this.mDealerUrl);
    dest.writeString(this.mStoreId);
    dest.writeString(this.mStoreUrl);
    dest.writeParcelable(this.mDimension, flags);
    dest.writeParcelable(this.mImages, flags);
    dest.writeSerializable(this.mCatrgoryIds);
    dest.writeString(this.mPdfUrl);
    dest.writeTypedList(mPages);/*from   w  w  w.j a  v a  2s . c om*/
    dest.writeParcelable(this.mDealer, flags);
    dest.writeParcelable(this.mStore, flags);
    dest.writeParcelable(this.mHotspots, flags);
}

From source file:com.eTilbudsavis.etasdk.model.Offer.java

public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.mErn);
    dest.writeString(this.mHeading);
    dest.writeString(this.mDescription);
    dest.writeInt(this.mCatalogPage);
    dest.writeParcelable(this.mPricing, flags);
    dest.writeParcelable(this.mQuantity, flags);
    dest.writeParcelable(this.mImages, flags);
    dest.writeParcelable(this.mLinks, flags);
    dest.writeLong(mRunFrom != null ? mRunFrom.getTime() : -1);
    dest.writeLong(mRunTill != null ? mRunTill.getTime() : -1);
    dest.writeString(this.mDealerUrl);
    dest.writeString(this.mDealerId);
    dest.writeString(this.mStoreUrl);
    dest.writeString(this.mStoreId);
    dest.writeString(this.mCatalogUrl);
    dest.writeString(this.mCatalogId);
    dest.writeParcelable(this.mCatalog, flags);
    dest.writeParcelable(this.mDealer, flags);
    dest.writeParcelable(this.mStore, flags);
}

From source file:com.mindmeapp.extensions.ExtensionData.java

@Override
public void writeToParcel(Parcel parcel, int i) {
    /**/*from   w w  w  .  j av  a  2s.  c om*/
     * NOTE: When adding fields in the process of updating this API, make sure to bump
     * {@link #PARCELABLE_VERSION}.
     */
    parcel.writeInt(PARCELABLE_VERSION);
    // Version 1 below
    parcel.writeInt(mVisible ? 1 : 0);
    parcel.writeInt(mIcon);
    parcel.writeString(mIconUri == null ? "" : mIconUri.toString());
    parcel.writeString(TextUtils.isEmpty(mStatusToDisplay) ? "" : mStatusToDisplay);
    parcel.writeString(TextUtils.isEmpty(mStatusToSpeak) ? "" : mStatusToSpeak);
    parcel.writeSerializable(mLanguageToSpeak);
    parcel.writeParcelable(mViewsToDisplay, i);
    parcel.writeString(TextUtils.isEmpty(mContentDescription) ? "" : mContentDescription);
    parcel.writeInt(mBackground);
    parcel.writeString(mBackgroundUri == null ? "" : mBackgroundUri.toString());
}

From source file:fiskinfoo.no.sintef.fiskinfoo.Baseclasses.ToolEntry.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(id);
    dest.writeList(coordinates);/*w ww.  j  av a 2 s  .  c  o  m*/
    dest.writeString(geometry.toString());
    dest.writeString(IMO);
    dest.writeString(IRCS);
    dest.writeString(MMSI);
    dest.writeString(RegNum);
    dest.writeString(VesselName);
    dest.writeString(VesselPhone);
    dest.writeString(VesselEmail);
    dest.writeString(ContactPersonEmail);
    dest.writeString(ContactPersonPhone);
    dest.writeString(ContactPersonName);
    dest.writeString(ToolTypeCode.toString());
    dest.writeString(Source);
    dest.writeString(Comment);
    dest.writeString(ShortComment);
    dest.writeString(RemovedTime);
    dest.writeString(SetupDateTime);
    dest.writeString(ToolId);
    dest.writeString(LastChangedDateTime);
    dest.writeString(LastChangedBySource);
    dest.writeString(toolStatus.toString());
    dest.writeInt(toolLogId);
}

From source file:com.nestlabs.sdk.Thermostat.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    Utils.writeBoolean(dest, mCanCool);/*from w  w w  .j  a  v a 2s  .  c  o  m*/
    Utils.writeBoolean(dest, mCanHeat);
    Utils.writeBoolean(dest, mIsUsingEmergencyHeat);
    Utils.writeBoolean(dest, mHasFan);
    Utils.writeBoolean(dest, mFanTimerActive);
    dest.writeString(mFanTimerTimeout);
    Utils.writeBoolean(dest, mHasLeaf);
    dest.writeString(mTemperatureScale);
    dest.writeLong(mTargetTemperatureF);
    dest.writeDouble(mTargetTemperatureC);
    dest.writeLong(mTargetTemperatureHighF);
    dest.writeDouble(mTargetTemperatureHighC);
    dest.writeLong(mTargetTemperatureLowF);
    dest.writeDouble(mTargetTemperatureLowC);
    dest.writeLong(mAwayTemperatureHighF);
    dest.writeDouble(mAwayTemperatureHighC);
    dest.writeLong(mAwayTemperatureLowF);
    dest.writeDouble(mAwayTemperatureLowC);
    dest.writeString(mHvacMode);
    dest.writeLong(mAmbientTemperatureF);
    dest.writeDouble(mAmbientTemperatureC);
    dest.writeLong(mHumidity);
    dest.writeString(mHvacState);
    Utils.writeBoolean(dest, mIsLocked);
    dest.writeString(mLockedTempMinF);
    dest.writeString(mLockedTempMaxF);
    dest.writeString(mLockedTempMinC);
    dest.writeString(mLockedTempMaxC);
    dest.writeString(mLabel);
}

From source file:de.mrapp.android.preference.activity.PreferenceHeader.java

@Override
public final void writeToParcel(final Parcel dest, final int flags) {
    TextUtils.writeToParcel(getTitle(), dest, flags);
    TextUtils.writeToParcel(getSummary(), dest, flags);
    TextUtils.writeToParcel(getBreadCrumbTitle(), dest, flags);
    TextUtils.writeToParcel(getBreadCrumbShortTitle(), dest, flags);
    Bitmap bitmap = (getIcon() != null && getIcon() instanceof BitmapDrawable)
            ? ((BitmapDrawable) getIcon()).getBitmap()
            : null;/*  ww  w .jav a  2 s .c  o m*/
    dest.writeParcelable(bitmap, flags);
    dest.writeString(getFragment());
    dest.writeBundle(getExtras());

    if (getIntent() != null) {
        dest.writeInt(1);
        getIntent().writeToParcel(dest, flags);
    } else {
        dest.writeInt(0);
    }
}

From source file:com.jecelyin.editor.v2.core.text.TextUtils.java

/**
 * Flatten a CharSequence and whatever styles can be copied across processes
 * into the parcel./* w ww.j  a  va2  s.c om*/
 */
public static void writeToParcel(CharSequence cs, Parcel p, int parcelableFlags) {
    if (cs instanceof Spanned) {
        p.writeInt(0);
        p.writeString(cs.toString());

        Spanned sp = (Spanned) cs;
        Object[] os = sp.getSpans(0, cs.length(), Object.class);

        // note to people adding to this: check more specific types
        // before more generic types.  also notice that it uses
        // "if" instead of "else if" where there are interfaces
        // so one object can be several.

        for (int i = 0; i < os.length; i++) {
            Object o = os[i];
            Object prop = os[i];

            if (prop instanceof CharacterStyle) {
                prop = ((CharacterStyle) prop).getUnderlying();
            }

            if (prop instanceof ParcelableSpan) {
                ParcelableSpan ps = (ParcelableSpan) prop;
                int spanTypeId = ps.getSpanTypeId();
                if (spanTypeId < FIRST_SPAN || spanTypeId > LAST_SPAN) {
                    Log.e(TAG, "external class \"" + ps.getClass().getSimpleName()
                            + "\" is attempting to use the frameworks-only ParcelableSpan" + " interface");
                } else {
                    p.writeInt(spanTypeId);
                    ps.writeToParcel(p, parcelableFlags);
                    writeWhere(p, sp, o);
                }
            }
        }

        p.writeInt(0);
    } else {
        p.writeInt(1);
        if (cs != null) {
            p.writeString(cs.toString());
        } else {
            p.writeString(null);
        }
    }
}

From source file:com.chuhan.privatecalc.fragment.os.BackStackState.java

public void writeToParcel(Parcel dest, int flags) {
    dest.writeIntArray(mOps);/* w ww. j a va 2s.  c om*/
    dest.writeInt(mTransition);
    dest.writeInt(mTransitionStyle);
    dest.writeString(mName);
    dest.writeInt(mIndex);
    dest.writeInt(mBreadCrumbTitleRes);
    TextUtils.writeToParcel(mBreadCrumbTitleText, dest, 0);
    dest.writeInt(mBreadCrumbShortTitleRes);
    TextUtils.writeToParcel(mBreadCrumbShortTitleText, dest, 0);
}

From source file:com.vk.sdkweb.api.model.VKApiUserFull.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeString(this.activity);
    dest.writeParcelable(this.status_audio, flags);
    dest.writeString(this.bdate);
    dest.writeParcelable(this.city, flags);
    dest.writeParcelable(this.country, flags);
    dest.writeLong(this.last_seen);
    dest.writeParcelable(this.universities, flags);
    dest.writeParcelable(this.schools, flags);
    dest.writeInt(this.smoking);
    dest.writeInt(this.alcohol);
    dest.writeInt(this.political);
    dest.writeInt(this.life_main);
    dest.writeInt(this.people_main);
    dest.writeString(this.inspired_by);
    dest.writeStringArray(this.langs);
    dest.writeString(this.religion);
    dest.writeString(this.facebook);
    dest.writeString(this.facebook_name);
    dest.writeString(this.livejournal);
    dest.writeString(this.skype);
    dest.writeString(this.site);
    dest.writeString(this.twitter);
    dest.writeString(this.instagram);
    dest.writeString(this.mobile_phone);
    dest.writeString(this.home_phone);
    dest.writeString(this.screen_name);
    dest.writeString(this.activities);
    dest.writeString(this.interests);
    dest.writeString(this.movies);
    dest.writeString(this.tv);
    dest.writeString(this.books);
    dest.writeString(this.games);
    dest.writeString(this.about);
    dest.writeString(this.quotes);
    dest.writeByte(can_post ? (byte) 1 : (byte) 0);
    dest.writeByte(can_see_all_posts ? (byte) 1 : (byte) 0);
    dest.writeByte(can_write_private_message ? (byte) 1 : (byte) 0);
    dest.writeByte(wall_comments ? (byte) 1 : (byte) 0);
    dest.writeByte(is_banned ? (byte) 1 : (byte) 0);
    dest.writeByte(is_deleted ? (byte) 1 : (byte) 0);
    dest.writeByte(wall_default_owner ? (byte) 1 : (byte) 0);
    dest.writeByte(verified ? (byte) 1 : (byte) 0);
    dest.writeInt(this.sex);
    dest.writeParcelable(this.counters, flags);
    dest.writeInt(this.relation);
    dest.writeParcelable(this.relatives, flags);
    dest.writeByte(blacklisted_by_me ? (byte) 1 : (byte) 0);
}

From source file:com.owncloud.android.datamodel.OCFile.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeLong(mId);/*from  w  w  w  . j a  v a2  s.  co  m*/
    dest.writeLong(mParentId);
    dest.writeLong(mLength);
    dest.writeLong(mCreationTimestamp);
    dest.writeLong(mModifiedTimestamp);
    dest.writeLong(mModifiedTimestampAtLastSyncForData);
    dest.writeString(mRemotePath);
    dest.writeString(mLocalPath);
    dest.writeString(mMimeType);
    dest.writeString(mAvailableOfflineStatus.name());
    dest.writeLong(mLastSyncDateForProperties);
    dest.writeLong(mLastSyncDateForData);
    dest.writeString(mEtag);
    dest.writeString(mTreeEtag);
    dest.writeInt(mSharedByLink ? 1 : 0);
    dest.writeString(mPermissions);
    dest.writeString(mRemoteId);
    dest.writeInt(mNeedsUpdateThumbnail ? 1 : 0);
    dest.writeInt(mIsDownloading ? 1 : 0);
    dest.writeString(mEtagInConflict);
    dest.writeInt(mSharedWithSharee ? 1 : 0);
    dest.writeString(mPrivateLink);
}