Example usage for android.os Parcel writeBundle

List of usage examples for android.os Parcel writeBundle

Introduction

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

Prototype

public final void writeBundle(Bundle val) 

Source Link

Document

Flatten a Bundle into the parcel at the current dataPosition(), growing dataCapacity() if needed.

Usage

From source file:org.mozilla.mozstumbler.service.datahandling.StumblerBundle.java

@Override
public void writeToParcel(Parcel out, int flags) {
    Bundle wifiBundle = new Bundle(ScanResult.class.getClassLoader());
    Collection<String> scans = mWifiData.keySet();
    for (String s : scans) {
        wifiBundle.putParcelable(s, mWifiData.get(s));
    }/*from   w ww  . jav  a 2  s .c  om*/

    Bundle cellBundle = new Bundle(CellInfo.class.getClassLoader());
    Collection<String> cells = mCellData.keySet();
    for (String c : cells) {
        cellBundle.putParcelable(c, mCellData.get(c));
    }

    out.writeBundle(wifiBundle);
    out.writeBundle(cellBundle);
    out.writeParcelable(mGpsPosition, 0);
    out.writeInt(mPhoneType);
}

From source file:com.fanfou.app.opensource.update.AppVersionInfo.java

@Override
public void writeToParcel(final Parcel dest, final int flags) {
    final Bundle bundle = new Bundle();
    bundle.putInt("versionCode", this.versionCode);
    bundle.putString("versionName", this.versionName);
    bundle.putString("releaseDate", this.releaseDate);
    bundle.putString("changelog", this.changelog);
    bundle.putString("downloadUrl", this.downloadUrl);
    bundle.putString("versionType", this.versionType);
    bundle.putString("packageName", this.packageName);
    bundle.putBoolean("forceUpdate", this.forceUpdate);
    dest.writeBundle(bundle);
}

From source file:org.alfresco.mobile.android.api.session.impl.CloudSessionImpl.java

@Override
public void writeToParcel(Parcel dest, int arg1) {
    dest.writeString(baseUrl);/*from ww  w . ja v  a  2  s .  c om*/
    dest.writeString(userIdentifier);
    dest.writeString(password);
    dest.writeSerializable(currentNetwork);
    dest.writeParcelable(rootNode, PARCELABLE_WRITE_RETURN_VALUE);
    dest.writeSerializable(repositoryInfo);
    dest.writeSerializable(cmisSession);
    Bundle b = new Bundle();
    b.putSerializable("userParameters", (Serializable) userParameters);
    dest.writeBundle(b);
}

From source file:com.twistedequations.rotor.MediaMetadataCompat.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeBundle(mBundle);
}

From source file:com.sayar.requests.RequestArguments.java

public void writeToParcel(final Parcel dest, final int flags) {
    dest.writeString(this.method.toValue());
    dest.writeString(this.url);
    dest.writeString(this.userAgent);
    dest.writeString(this.parseAs);
    final Bundle params = new Bundle();
    params.putSerializable("map", (Serializable) this.params);
    dest.writeBundle(params);

    final Bundle headers = new Bundle();
    params.putSerializable("map", (Serializable) this.headers);
    dest.writeBundle(headers);//from  ww w.  j a v a 2  s  .  c o  m
}

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;/*w  w  w  .j a v  a2 s.co  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.clover.sdk.v3.billing.AppLineItem.java

@Override
public void writeToParcel(android.os.Parcel dest, int flags) {
    com.clover.sdk.v3.JsonParcelHelper.wrap(getJSONObject()).writeToParcel(dest, 0);
    dest.writeBundle(bundle);
    dest.writeBundle(changeLog);/*from  w w  w .  j  ava 2 s  .co m*/
}

From source file:org.y20k.transistor.core.Station.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(TITLE);/*from  w w w . j a v  a 2 s . c  om*/
    dest.writeString(StreamURI);
    dest.writeBundle(mStationFetchResults);
    dest.writeByte((byte) (mPlayback ? 1 : 0)); // if mPlayback == true, byte == 1
    dest.writeLong(_ID);
    dest.writeString(UNIQUE_ID);
    dest.writeString(SUBTITLE);
    dest.writeString(IMAGE_PATH);
    dest.writeString(IMAGE_FILE_NAME);
    dest.writeString(SMALL_IMAGE_FILE_NAME);
    dest.writeString(CONTENT_TYPE);
    dest.writeString(DESCRIPTION);
    dest.writeInt(RATING);
    dest.writeString(COMMA_SEPARATED_TAGS);
    dest.writeString(CATEGORY);
    dest.writeString(MarkdownDescription);
    dest.writeString(SMALL_IMAGE_PATH);
    dest.writeInt(IS_FAVOURITE);
    dest.writeString(THUMP_UP_STATUS);
}

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

public void writeToParcel(Parcel out, int flags) {
    out.writeFloat(getStationaryRadius());
    out.writeInt(getDistanceFilter());//from   w  w w . j  av  a 2 s  .  com
    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:android.app.FragmentState.java

public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(mClassName);//from  w ww  .  j  a  v  a 2  s  .  c om
    dest.writeInt(mIndex);
    dest.writeInt(mFromLayout ? 1 : 0);
    dest.writeInt(mFragmentId);
    dest.writeInt(mContainerId);
    dest.writeString(mTag);
    dest.writeInt(mRetainInstance ? 1 : 0);
    dest.writeInt(mDetached ? 1 : 0);
    dest.writeBundle(mArguments);
    dest.writeBundle(mSavedFragmentState);
}