Android Essentials → Android PersistableBundle Introduction. – Camposha

Android Essentials

Android Essentials

Android PersistableBundle Introduction.

A PersistableBundle is a type of Bundle that maps Strings to types types that can be saved and later restored.

 

PersistableBundle definition

PersistableBundle, like Bundle resides in the android.os package:

package android.os;

It was added back in android API level 21.

Persistable class is a final class:

public final class PersistableBundle..{}

so you cannot derive from it.

Like the Bundle class it derives from BaseBundle:

public final class PersistableBundle extends BaseBundle..{}

So it inherits a whole bunch of methods for inserting, retrieving, removing entries into the PersistableBundle.

PersistableBundle implements two interfaces:

Interface Description
Cloneable So that it supports cloning.
Parcelable So that it supports writing to and restoration from a parcel.

Leave a Reply

Your email address will not be published. Required fields are marked *

Price

Free

Rating

Not enough ratings to display
X