Android 12 Developer Preview is here! Try it out, and give us your feedback!

Bundleable

public final class Bundleable
extends Object implements Parcelable

java.lang.Object
   ↳ androidx.car.app.serialization.Bundleable


A class that serializes and stores an object for sending over IPC.

Summary

Inherited constants

Fields

public static final Creator<Bundleable> CREATOR

Public methods

static Bundleable create(Object objectToSerialize)

Serializes the objectToSerialize into a Bundleable to send over IPC.

int describeContents()
Object get()

De-serializes the object passed in for IPC communication.

void writeToParcel(Parcel dest, int flags)

Inherited methods

Fields

CREATOR

public static final Creator<Bundleable> CREATOR

Public methods

create

public static Bundleable create (Object objectToSerialize)

Serializes the objectToSerialize into a Bundleable to send over IPC.

Parameters
objectToSerialize Object

Returns
Bundleable

Throws
BundlerException if serialization fails

describeContents

public int describeContents ()

Returns
int

get

public Object get ()

De-serializes the object passed in for IPC communication.

Returns
Object

Throws
BundlerException if deserialization fails

writeToParcel

public void writeToParcel (Parcel dest, 
                int flags)

Parameters
dest Parcel

flags int