Android PersistableBundle Introduction.

| Page Views: 418

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.

How do You Feel after reading this?

According to scientists, we humans have 8 primary innate emotions: joy, acceptance, fear, surprise, sadness, disgust, anger, and anticipation. Feel free to tell us how you feel about this article using these emotes or via the comment section.

About Me.

After completing his Software Engineering bachelors program, Oclemy(Clement Ochieng) these days is a man of two lives. At day he works for a startup in Nairobi, Kenya. At night he works tirelessly on building ProgrammingWizards TV, a tv channel for student coders and this website to help share the source code. In between he practices Meditation and Self actualization to help him keep balance. He also likes going for long solo walks to connect more with nature.


What do You Think

Previous Post Next Post