Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Inherited Constants](https://developer.android.com/reference/android/os/Bundle#inhconstants) \| [Fields](https://developer.android.com/reference/android/os/Bundle#lfields) \| [Ctors](https://developer.android.com/reference/android/os/Bundle#pubctors) \| [Methods](https://developer.android.com/reference/android/os/Bundle#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/os/Bundle#inhmethods)

# Bundle

*** ** * ** ***

` public final class Bundle `   
` ` ` extends https://developer.android.com/reference/android/os/BaseBundle ` ` implements https://developer.android.com/reference/java/lang/Cloneable, https://developer.android.com/reference/android/os/Parcelable `

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.os.BaseBundle](https://developer.android.com/reference/android/os/BaseBundle) ||
|   | ↳ | android.os.Bundle |

<br />

*** ** * ** ***

A mapping from String keys to various `https://developer.android.com/reference/android/os/Parcelable` values.

**Warning:** Note that `https://developer.android.com/reference/android/os/Bundle` is a lazy container and as such it does NOT implement `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` or `https://developer.android.com/reference/java/lang/Object#hashCode()`.
**See also:**

- `https://developer.android.com/reference/android/os/PersistableBundle`

## Summary

### Inherited constants

From interface `https://developer.android.com/reference/android/os/Parcelable` `int` `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR`

Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor.
`int` `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`

Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`".

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/os/Bundle>` | `https://developer.android.com/reference/android/os/Bundle#CREATOR` <br /> |
| ` public static final https://developer.android.com/reference/android/os/Bundle` | `https://developer.android.com/reference/android/os/Bundle#EMPTY` An unmodifiable `Bundle` that is always `https://developer.android.com/reference/android/os/BaseBundle#isEmpty()`. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/os/Bundle#Bundle()() ` |
| ` https://developer.android.com/reference/android/os/Bundle#Bundle(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle b) ` Constructs a Bundle containing a copy of the mappings from the given Bundle. |
| ` https://developer.android.com/reference/android/os/Bundle#Bundle(android.os.PersistableBundle)(https://developer.android.com/reference/android/os/PersistableBundle b) ` Constructs a Bundle containing a copy of the mappings from the given PersistableBundle. |
| ` https://developer.android.com/reference/android/os/Bundle#Bundle(int)(int capacity) ` Constructs a new, empty Bundle sized to hold the given number of elements. |
| ` https://developer.android.com/reference/android/os/Bundle#Bundle(java.lang.ClassLoader)(https://developer.android.com/reference/java/lang/ClassLoader loader) ` Constructs a new, empty Bundle that uses a specific ClassLoader for instantiating Parcelable and Serializable objects. |

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#clear()() ` Removes all elements from the mapping of this Bundle. |
| ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/android/os/Bundle#clone()() ` Clones the current Bundle. |
| ` https://developer.android.com/reference/android/os/Bundle` | ` https://developer.android.com/reference/android/os/Bundle#deepCopy()() ` Make a deep copy of the given bundle. |
| ` int` | ` https://developer.android.com/reference/android/os/Bundle#describeContents()() ` Report the nature of this Parcelable's contents |
| ` https://developer.android.com/reference/android/os/IBinder` | ` https://developer.android.com/reference/android/os/Bundle#getBinder(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key. |
| ` https://developer.android.com/reference/android/os/Bundle` | ` https://developer.android.com/reference/android/os/Bundle#getBundle(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key. |
| ` byte` | ` https://developer.android.com/reference/android/os/Bundle#getByte(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Returns the value associated with the given key, or (byte) 0 if no mapping of the desired type exists for the given key. |
| ` https://developer.android.com/reference/java/lang/Byte` | ` https://developer.android.com/reference/android/os/Bundle#getByte(java.lang.String,%20byte)(https://developer.android.com/reference/java/lang/String key, byte defaultValue) ` Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. |
| ` byte[]` | ` https://developer.android.com/reference/android/os/Bundle#getByteArray(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key. |
| ` char` | ` https://developer.android.com/reference/android/os/Bundle#getChar(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Returns the value associated with the given key, or (char) 0 if no mapping of the desired type exists for the given key. |
| ` char` | ` https://developer.android.com/reference/android/os/Bundle#getChar(java.lang.String,%20char)(https://developer.android.com/reference/java/lang/String key, char defaultValue) ` Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. |
| ` char[]` | ` https://developer.android.com/reference/android/os/Bundle#getCharArray(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/os/Bundle#getCharSequence(java.lang.String,%20java.lang.CharSequence)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/java/lang/CharSequence defaultValue) ` Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key or if a null value is explicitly associatd with the given key. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/os/Bundle#getCharSequence(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/os/Bundle#getCharSequenceArray(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key. |
| ` https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/java/lang/CharSequence>` | ` https://developer.android.com/reference/android/os/Bundle#getCharSequenceArrayList(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key. |
| ` https://developer.android.com/reference/java/lang/ClassLoader` | ` https://developer.android.com/reference/android/os/Bundle#getClassLoader()() ` Return the ClassLoader currently associated with this Bundle. |
| ` float` | ` https://developer.android.com/reference/android/os/Bundle#getFloat(java.lang.String,%20float)(https://developer.android.com/reference/java/lang/String key, float defaultValue) ` Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. |
| ` float` | ` https://developer.android.com/reference/android/os/Bundle#getFloat(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Returns the value associated with the given key, or 0.0f if no mapping of the desired type exists for the given key. |
| ` float[]` | ` https://developer.android.com/reference/android/os/Bundle#getFloatArray(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key. |
| ` https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/java/lang/Integer>` | ` https://developer.android.com/reference/android/os/Bundle#getIntegerArrayList(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key. |
| ` <T extends https://developer.android.com/reference/android/os/Parcelable> T` | ` https://developer.android.com/reference/android/os/Bundle#getParcelable(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` *This method was deprecated in API level 33. Use the type-safer `https://developer.android.com/reference/android/os/Bundle#getParcelable(java.lang.String,%20java.lang.Class<T>)` starting from Android `https://developer.android.com/reference/android/os/Build.VERSION_CODES#TIRAMISU`.* |
| ` <T> T` | ` https://developer.android.com/reference/android/os/Bundle#getParcelable(java.lang.String,%20java.lang.Class<T>)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/java/lang/Class<T> clazz) ` Returns the value associated with the given key or `null` if: - No mapping of the desired type exists for the given key. <br /> |
| ` <T> T[]` | ` https://developer.android.com/reference/android/os/Bundle#getParcelableArray(java.lang.String,%20java.lang.Class<T>)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/java/lang/Class<T> clazz) ` Returns the value associated with the given key, or `null` if: - No mapping of the desired type exists for the given key. <br /> |
| ` https://developer.android.com/reference/android/os/Parcelable` | ` https://developer.android.com/reference/android/os/Bundle#getParcelableArray(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` *This method was deprecated in API level 33. Use the type-safer `https://developer.android.com/reference/android/os/Bundle#getParcelableArray(java.lang.String,%20java.lang.Class<T>)` starting from Android `https://developer.android.com/reference/android/os/Build.VERSION_CODES#TIRAMISU`.* |
| ` <T> https://developer.android.com/reference/java/util/ArrayList<T>` | ` https://developer.android.com/reference/android/os/Bundle#getParcelableArrayList(java.lang.String,%20java.lang.Class<?%20extends%20T>)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/java/lang/Class<? extends T> clazz) ` Returns the value associated with the given key, or `null` if: - No mapping of the desired type exists for the given key. <br /> |
| ` <T extends https://developer.android.com/reference/android/os/Parcelable> https://developer.android.com/reference/java/util/ArrayList<T>` | ` https://developer.android.com/reference/android/os/Bundle#getParcelableArrayList(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` *This method was deprecated in API level 33. Use the type-safer `https://developer.android.com/reference/android/os/Bundle#getParcelable(java.lang.String,%20java.lang.Class<T>)` starting from Android `https://developer.android.com/reference/android/os/Build.VERSION_CODES#TIRAMISU`.* |
| ` <T extends https://developer.android.com/reference/java/io/Serializable> T` | ` https://developer.android.com/reference/android/os/Bundle#getSerializable(java.lang.String,%20java.lang.Class<T>)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/java/lang/Class<T> clazz) ` Returns the value associated with the given key, or `null` if: - No mapping of the desired type exists for the given key. <br /> |
| ` https://developer.android.com/reference/java/io/Serializable` | ` https://developer.android.com/reference/android/os/Bundle#getSerializable(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` *This method was deprecated in API level 33. Use the type-safer `https://developer.android.com/reference/android/os/Bundle#getSerializable(java.lang.String,%20java.lang.Class<T>)` starting from Android `https://developer.android.com/reference/android/os/Build.VERSION_CODES#TIRAMISU`.* |
| ` short` | ` https://developer.android.com/reference/android/os/Bundle#getShort(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Returns the value associated with the given key, or (short) 0 if no mapping of the desired type exists for the given key. |
| ` short` | ` https://developer.android.com/reference/android/os/Bundle#getShort(java.lang.String,%20short)(https://developer.android.com/reference/java/lang/String key, short defaultValue) ` Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. |
| ` short[]` | ` https://developer.android.com/reference/android/os/Bundle#getShortArray(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key. |
| ` https://developer.android.com/reference/android/util/Size` | ` https://developer.android.com/reference/android/os/Bundle#getSize(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key. |
| ` https://developer.android.com/reference/android/util/SizeF` | ` https://developer.android.com/reference/android/os/Bundle#getSizeF(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key. |
| ` <T extends https://developer.android.com/reference/android/os/Parcelable> https://developer.android.com/reference/android/util/SparseArray<T>` | ` https://developer.android.com/reference/android/os/Bundle#getSparseParcelableArray(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` *This method was deprecated in API level 33. Use the type-safer `https://developer.android.com/reference/android/os/Bundle#getSparseParcelableArray(java.lang.String,%20java.lang.Class<?%20extends%20T>)` starting from Android `https://developer.android.com/reference/android/os/Build.VERSION_CODES#TIRAMISU`.* |
| ` <T> https://developer.android.com/reference/android/util/SparseArray<T>` | ` https://developer.android.com/reference/android/os/Bundle#getSparseParcelableArray(java.lang.String,%20java.lang.Class<?%20extends%20T>)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/java/lang/Class<? extends T> clazz) ` Returns the value associated with the given key, or `null` if: - No mapping of the desired type exists for the given key. <br /> |
| ` https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/java/lang/String>` | ` https://developer.android.com/reference/android/os/Bundle#getStringArrayList(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key. |
| ` boolean` | ` https://developer.android.com/reference/android/os/Bundle#hasFileDescriptors()() ` Reports whether the bundle contains any parcelled file descriptors. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putAll(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle bundle) ` Inserts all mappings from the given Bundle into this Bundle. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putBinder(java.lang.String,%20android.os.IBinder)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/android/os/IBinder value) ` Inserts an `https://developer.android.com/reference/android/os/IBinder` value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putBundle(java.lang.String,%20android.os.Bundle)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/android/os/Bundle value) ` Inserts a Bundle value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putByte(java.lang.String,%20byte)(https://developer.android.com/reference/java/lang/String key, byte value) ` Inserts a byte value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putByteArray(java.lang.String,%20byte[])(https://developer.android.com/reference/java/lang/String key, byte[] value) ` Inserts a byte array value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putChar(java.lang.String,%20char)(https://developer.android.com/reference/java/lang/String key, char value) ` Inserts a char value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putCharArray(java.lang.String,%20char[])(https://developer.android.com/reference/java/lang/String key, char[] value) ` Inserts a char array value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putCharSequence(java.lang.String,%20java.lang.CharSequence)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/java/lang/CharSequence value) ` Inserts a CharSequence value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putCharSequenceArray(java.lang.String,%20java.lang.CharSequence[])(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/java/lang/CharSequence value) ` Inserts a CharSequence array value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putCharSequenceArrayList(java.lang.String,%20java.util.ArrayList<java.lang.CharSequence>)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/java/lang/CharSequence> value) ` Inserts an ArrayList value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putFloat(java.lang.String,%20float)(https://developer.android.com/reference/java/lang/String key, float value) ` Inserts a float value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putFloatArray(java.lang.String,%20float[])(https://developer.android.com/reference/java/lang/String key, float[] value) ` Inserts a float array value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putIntegerArrayList(java.lang.String,%20java.util.ArrayList<java.lang.Integer>)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/java/lang/Integer> value) ` Inserts an ArrayList value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putParcelable(java.lang.String,%20android.os.Parcelable)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/android/os/Parcelable value) ` Inserts a Parcelable value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putParcelableArray(java.lang.String,%20android.os.Parcelable[])(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/android/os/Parcelable value) ` Inserts an array of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putParcelableArrayList(java.lang.String,%20java.util.ArrayList<?%20extends%20android.os.Parcelable>)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/java/util/ArrayList<? extends https://developer.android.com/reference/android/os/Parcelable> value) ` Inserts a List of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putSerializable(java.lang.String,%20java.io.Serializable)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/java/io/Serializable value) ` Inserts a Serializable value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putShort(java.lang.String,%20short)(https://developer.android.com/reference/java/lang/String key, short value) ` Inserts a short value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putShortArray(java.lang.String,%20short[])(https://developer.android.com/reference/java/lang/String key, short[] value) ` Inserts a short array value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putSize(java.lang.String,%20android.util.Size)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/android/util/Size value) ` Inserts a Size value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putSizeF(java.lang.String,%20android.util.SizeF)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/android/util/SizeF value) ` Inserts a SizeF value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putSparseParcelableArray(java.lang.String,%20android.util.SparseArray<?%20extends%20android.os.Parcelable>)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/android/util/SparseArray<? extends https://developer.android.com/reference/android/os/Parcelable> value) ` Inserts a SparceArray of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#putStringArrayList(java.lang.String,%20java.util.ArrayList<java.lang.String>)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/java/lang/String> value) ` Inserts an ArrayList value into the mapping of this Bundle, replacing any existing value for the given key. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#readFromParcel(android.os.Parcel)(https://developer.android.com/reference/android/os/Parcel parcel) ` Reads the Parcel contents into this Bundle, typically in order for it to be passed through an IBinder connection. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#remove(java.lang.String)(https://developer.android.com/reference/java/lang/String key) ` Removes any entry with the given key from the mapping of this Bundle. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#setClassLoader(java.lang.ClassLoader)(https://developer.android.com/reference/java/lang/ClassLoader loader) ` Changes the ClassLoader this Bundle uses when instantiating objects. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/os/Bundle#toString()() ` Returns a string representation of the `https://developer.android.com/reference/android/os/Bundle` that may be suitable for debugging. |
| ` void` | ` https://developer.android.com/reference/android/os/Bundle#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel parcel, int flags) ` Writes the Bundle contents to a Parcel, typically in order for it to be passed through an IBinder connection. |

### Inherited methods

From class ` https://developer.android.com/reference/android/os/BaseBundle ` ` void` ` https://developer.android.com/reference/android/os/BaseBundle#clear()() `

Removes all elements from the mapping of this Bundle.
` boolean` ` https://developer.android.com/reference/android/os/BaseBundle#containsKey(java.lang.String)(https://developer.android.com/reference/java/lang/String key) `

Returns true if the given key is contained in the mapping of this Bundle.
` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/android/os/BaseBundle#get(java.lang.String)(https://developer.android.com/reference/java/lang/String key) `

*This method was deprecated in API level 33. Use the type-safe specific APIs depending on the type of the item to be retrieved, eg. `https://developer.android.com/reference/android/os/BaseBundle#getString(java.lang.String)`.*
` boolean` ` https://developer.android.com/reference/android/os/BaseBundle#getBoolean(java.lang.String,%20boolean)(https://developer.android.com/reference/java/lang/String key, boolean defaultValue) `

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
` boolean` ` https://developer.android.com/reference/android/os/BaseBundle#getBoolean(java.lang.String)(https://developer.android.com/reference/java/lang/String key) `

Returns the value associated with the given key, or false if no mapping of the desired type exists for the given key.
` boolean[]` ` https://developer.android.com/reference/android/os/BaseBundle#getBooleanArray(java.lang.String)(https://developer.android.com/reference/java/lang/String key) `

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
` byte[]` ` https://developer.android.com/reference/android/os/BaseBundle#getByteArray(java.lang.String)(https://developer.android.com/reference/java/lang/String key) `

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
` double` ` https://developer.android.com/reference/android/os/BaseBundle#getDouble(java.lang.String,%20double)(https://developer.android.com/reference/java/lang/String key, double defaultValue) `

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
` double` ` https://developer.android.com/reference/android/os/BaseBundle#getDouble(java.lang.String)(https://developer.android.com/reference/java/lang/String key) `

Returns the value associated with the given key, or 0.0 if no mapping of the desired type exists for the given key.
` double[]` ` https://developer.android.com/reference/android/os/BaseBundle#getDoubleArray(java.lang.String)(https://developer.android.com/reference/java/lang/String key) `

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
` int` ` https://developer.android.com/reference/android/os/BaseBundle#getInt(java.lang.String)(https://developer.android.com/reference/java/lang/String key) `

Returns the value associated with the given key, or 0 if no mapping of the desired type exists for the given key.
` int` ` https://developer.android.com/reference/android/os/BaseBundle#getInt(java.lang.String,%20int)(https://developer.android.com/reference/java/lang/String key, int defaultValue) `

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
` int[]` ` https://developer.android.com/reference/android/os/BaseBundle#getIntArray(java.lang.String)(https://developer.android.com/reference/java/lang/String key) `

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
` long` ` https://developer.android.com/reference/android/os/BaseBundle#getLong(java.lang.String)(https://developer.android.com/reference/java/lang/String key) `

Returns the value associated with the given key, or 0L if no mapping of the desired type exists for the given key.
` long` ` https://developer.android.com/reference/android/os/BaseBundle#getLong(java.lang.String,%20long)(https://developer.android.com/reference/java/lang/String key, long defaultValue) `

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
` long[]` ` https://developer.android.com/reference/android/os/BaseBundle#getLongArray(java.lang.String)(https://developer.android.com/reference/java/lang/String key) `

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/android/os/BaseBundle#getString(java.lang.String)(https://developer.android.com/reference/java/lang/String key) `

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/android/os/BaseBundle#getString(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/java/lang/String defaultValue) `

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key or if a null value is explicitly associated with the given key.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/android/os/BaseBundle#getStringArray(java.lang.String)(https://developer.android.com/reference/java/lang/String key) `

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
` boolean` ` https://developer.android.com/reference/android/os/BaseBundle#isEmpty()() `

Returns true if the mapping of this Bundle is empty, false otherwise.
` https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/String>` ` https://developer.android.com/reference/android/os/BaseBundle#keySet()() `

Returns a Set containing the Strings used as keys in this Bundle.
` void` ` https://developer.android.com/reference/android/os/BaseBundle#putAll(android.os.PersistableBundle)(https://developer.android.com/reference/android/os/PersistableBundle bundle) `

Inserts all mappings from the given PersistableBundle into this BaseBundle.
` void` ` https://developer.android.com/reference/android/os/BaseBundle#putBoolean(java.lang.String,%20boolean)(https://developer.android.com/reference/java/lang/String key, boolean value) `

Inserts a Boolean value into the mapping of this Bundle, replacing any existing value for the given key.
` void` ` https://developer.android.com/reference/android/os/BaseBundle#putBooleanArray(java.lang.String,%20boolean[])(https://developer.android.com/reference/java/lang/String key, boolean[] value) `

Inserts a boolean array value into the mapping of this Bundle, replacing any existing value for the given key.
` void` ` https://developer.android.com/reference/android/os/BaseBundle#putByteArray(java.lang.String,%20byte[])(https://developer.android.com/reference/java/lang/String key, byte[] value) `

Inserts a byte array value into the mapping of this Bundle, replacing any existing value for the given key.
` void` ` https://developer.android.com/reference/android/os/BaseBundle#putDouble(java.lang.String,%20double)(https://developer.android.com/reference/java/lang/String key, double value) `

Inserts a double value into the mapping of this Bundle, replacing any existing value for the given key.
` void` ` https://developer.android.com/reference/android/os/BaseBundle#putDoubleArray(java.lang.String,%20double[])(https://developer.android.com/reference/java/lang/String key, double[] value) `

Inserts a double array value into the mapping of this Bundle, replacing any existing value for the given key.
` void` ` https://developer.android.com/reference/android/os/BaseBundle#putInt(java.lang.String,%20int)(https://developer.android.com/reference/java/lang/String key, int value) `

Inserts an int value into the mapping of this Bundle, replacing any existing value for the given key.
` void` ` https://developer.android.com/reference/android/os/BaseBundle#putIntArray(java.lang.String,%20int[])(https://developer.android.com/reference/java/lang/String key, int[] value) `

Inserts an int array value into the mapping of this Bundle, replacing any existing value for the given key.
` void` ` https://developer.android.com/reference/android/os/BaseBundle#putLong(java.lang.String,%20long)(https://developer.android.com/reference/java/lang/String key, long value) `

Inserts a long value into the mapping of this Bundle, replacing any existing value for the given key.
` void` ` https://developer.android.com/reference/android/os/BaseBundle#putLongArray(java.lang.String,%20long[])(https://developer.android.com/reference/java/lang/String key, long[] value) `

Inserts a long array value into the mapping of this Bundle, replacing any existing value for the given key.
` void` ` https://developer.android.com/reference/android/os/BaseBundle#putString(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/java/lang/String value) `

Inserts a String value into the mapping of this Bundle, replacing any existing value for the given key.
` void` ` https://developer.android.com/reference/android/os/BaseBundle#putStringArray(java.lang.String,%20java.lang.String[])(https://developer.android.com/reference/java/lang/String key, https://developer.android.com/reference/java/lang/String value) `

Inserts a String array value into the mapping of this Bundle, replacing any existing value for the given key.
` void` ` https://developer.android.com/reference/android/os/BaseBundle#remove(java.lang.String)(https://developer.android.com/reference/java/lang/String key) `

Removes any entry with the given key from the mapping of this Bundle.
` int` ` https://developer.android.com/reference/android/os/BaseBundle#size()() `

Returns the number of mappings contained in this Bundle.
From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.
From interface ` https://developer.android.com/reference/android/os/Parcelable ` ` abstract int` ` https://developer.android.com/reference/android/os/Parcelable#describeContents()() `

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
` abstract void` ` https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) `

Flatten this object in to a Parcel.

## Fields

### CREATOR

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Creator<Bundle> CREATOR
```

<br />

<br />

### EMPTY

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Bundle EMPTY
```

An unmodifiable `Bundle` that is always `https://developer.android.com/reference/android/os/BaseBundle#isEmpty()`.

<br />

## Public constructors

### Bundle

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Bundle ()
```

<br />

<br />

### Bundle

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Bundle (Bundle b)
```

Constructs a Bundle containing a copy of the mappings from the given Bundle. Does only a shallow copy of the original Bundle -- see `https://developer.android.com/reference/android/os/Bundle#deepCopy()` if that is not what you want.

<br />

| Parameters ||
|---|---|
| `b` | `Bundle`: a Bundle to be copied. <br /> |

**See also:**

- `https://developer.android.com/reference/android/os/Bundle#deepCopy()`

### Bundle

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Bundle (PersistableBundle b)
```

Constructs a Bundle containing a copy of the mappings from the given PersistableBundle. Does only a shallow copy of the PersistableBundle -- see `https://developer.android.com/reference/android/os/PersistableBundle#deepCopy()` if you don't want that.

<br />

| Parameters ||
|---|---|
| `b` | `PersistableBundle`: a PersistableBundle to be copied. <br /> |

### Bundle

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Bundle (int capacity)
```

Constructs a new, empty Bundle sized to hold the given number of elements. The Bundle will grow as needed.

<br />

| Parameters ||
|---|---|
| `capacity` | `int`: the initial capacity of the Bundle <br /> |

### Bundle

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Bundle (ClassLoader loader)
```

Constructs a new, empty Bundle that uses a specific ClassLoader for instantiating Parcelable and Serializable objects.

<br />

| Parameters ||
|---|---|
| `loader` | `ClassLoader`: An explicit ClassLoader to use when instantiating objects inside of the Bundle. <br /> |

## Public methods

### clear

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void clear ()
```

Removes all elements from the mapping of this Bundle.

<br />

### clone

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Object clone ()
```

Clones the current Bundle. The internal map is cloned, but the keys and values to which it refers are copied by reference.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/Object` | a clone of this instance. <br /> |

### deepCopy

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Bundle deepCopy ()
```

Make a deep copy of the given bundle. Traverses into inner containers and copies them as well, so they are not shared across bundles. Will traverse in to `https://developer.android.com/reference/android/os/Bundle`, `https://developer.android.com/reference/android/os/PersistableBundle`, `https://developer.android.com/reference/java/util/ArrayList`, and all types of primitive arrays. Other types of objects (such as Parcelable or Serializable) are referenced as-is and not copied in any way.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/Bundle` | <br /> |

### describeContents

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int describeContents ()
```

Report the nature of this Parcelable's contents

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### getBinder

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public IBinder getBinder (String key)
```

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/IBinder` | an IBinder value, or null <br /> |

### getBundle

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Bundle getBundle (String key)
```

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/Bundle` | a Bundle value, or null <br /> |

### getByte

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public byte getByte (String key)
```

Returns the value associated with the given key, or (byte) 0 if no mapping of the desired type exists for the given key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String <br /> |

| Returns ||
|---|---|
| `byte` | a byte value <br /> |

### getByte

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Byte getByte (String key, 
                byte defaultValue)
```

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String <br /> |
| `defaultValue` | `byte`: Value to return if key does not exist <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/Byte` | a byte value <br /> |

### getByteArray

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public byte[] getByteArray (String key)
```

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `byte[]` | a byte\[\] value, or null <br /> |

### getChar

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public char getChar (String key)
```

Returns the value associated with the given key, or (char) 0 if no mapping of the desired type exists for the given key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String <br /> |

| Returns ||
|---|---|
| `char` | a char value <br /> |

### getChar

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public char getChar (String key, 
                char defaultValue)
```

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String <br /> |
| `defaultValue` | `char`: Value to return if key does not exist <br /> |

| Returns ||
|---|---|
| `char` | a char value <br /> |

### getCharArray

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public char[] getCharArray (String key)
```

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `char[]` | a char\[\] value, or null <br /> |

### getCharSequence

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence getCharSequence (String key, 
                CharSequence defaultValue)
```

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key or if a null value is explicitly associatd with the given key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `defaultValue` | `CharSequence`: Value to return if key does not exist or if a null value is associated with the given key. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | the CharSequence value associated with the given key, or defaultValue if no valid CharSequence object is currently mapped to that key. <br /> |

### getCharSequence

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence getCharSequence (String key)
```

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | a CharSequence value, or null <br /> |

### getCharSequenceArray

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence[] getCharSequenceArray (String key)
```

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | a CharSequence\[\] value, or null <br /> |

### getCharSequenceArrayList

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ArrayList<CharSequence> getCharSequenceArrayList (String key)
```

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/java/lang/CharSequence>` | an ArrayList value, or null <br /> |

### getClassLoader

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ClassLoader getClassLoader ()
```

Return the ClassLoader currently associated with this Bundle.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/ClassLoader` | <br /> |

### getFloat

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getFloat (String key, 
                float defaultValue)
```

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String <br /> |
| `defaultValue` | `float`: Value to return if key does not exist <br /> |

| Returns ||
|---|---|
| `float` | a float value <br /> |

### getFloat

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getFloat (String key)
```

Returns the value associated with the given key, or 0.0f if no mapping of the desired type exists for the given key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String <br /> |

| Returns ||
|---|---|
| `float` | a float value <br /> |

### getFloatArray

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float[] getFloatArray (String key)
```

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `float[]` | a float\[\] value, or null <br /> |

### getIntegerArrayList

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ArrayList<Integer> getIntegerArrayList (String key)
```

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/java/lang/Integer>` | an ArrayList value, or null <br /> |

### getParcelable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public T getParcelable (String key)
```

<br />

**This method was deprecated in API level 33.**   

Use the type-safer `https://developer.android.com/reference/android/os/Bundle#getParcelable(java.lang.String,%20java.lang.Class<T>)` starting from Android `https://developer.android.com/reference/android/os/Build.VERSION_CODES#TIRAMISU`.

Returns the value associated with the given key, or `null` if no mapping of the desired type exists for the given key or a `null` value is explicitly associated with the key.

**Note:** if the expected value is not a class provided by the Android platform, you must call `https://developer.android.com/reference/android/os/Bundle#setClassLoader(java.lang.ClassLoader)` with the proper `https://developer.android.com/reference/java/lang/ClassLoader` first. Otherwise, this method might throw an exception or return `null`.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or `null` <br /> |

| Returns ||
|---|---|
| `T` | a Parcelable value, or `null` <br /> |

### getParcelable

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public T getParcelable (String key, 
                Class<T> clazz)
```

Returns the value associated with the given key or `null` if:

- No mapping of the desired type exists for the given key.
- A `null` value is explicitly associated with the key.
- The object is not of type `clazz`.

**Note:** if the expected value is not a class provided by the Android platform, you must call `https://developer.android.com/reference/android/os/Bundle#setClassLoader(java.lang.ClassLoader)` with the proper `https://developer.android.com/reference/java/lang/ClassLoader` first. Otherwise, this method might throw an exception or return `null`.

**Warning:** the class that implements `https://developer.android.com/reference/android/os/Parcelable` has to be the immediately enclosing class of the runtime type of its CREATOR field (that is, `https://developer.android.com/reference/java/lang/Class#getEnclosingClass()` has to return the parcelable implementing class), otherwise this method might throw an exception. If the Parcelable class does not enclose the CREATOR, use the deprecated `https://developer.android.com/reference/android/os/Bundle#getParcelable(java.lang.String)` instead.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or `null` <br /> |
| `clazz` | `Class`: The type of the object expected. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `T` | a Parcelable value, or `null` <br /> |

### getParcelableArray

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public T[] getParcelableArray (String key, 
                Class<T> clazz)
```

Returns the value associated with the given key, or `null` if:

- No mapping of the desired type exists for the given key.
- A `null` value is explicitly associated with the key.
- The object is not of type `clazz`.

**Note:** if the expected value is not a class provided by the Android platform, you must call `https://developer.android.com/reference/android/os/Bundle#setClassLoader(java.lang.ClassLoader)` with the proper `https://developer.android.com/reference/java/lang/ClassLoader` first. Otherwise, this method might throw an exception or return `null`.

**Warning:** if the list contains items implementing the `https://developer.android.com/reference/android/os/Parcelable` interface, the class that implements `https://developer.android.com/reference/android/os/Parcelable` has to be the immediately enclosing class of the runtime type of its CREATOR field (that is, `https://developer.android.com/reference/java/lang/Class#getEnclosingClass()` has to return the parcelable implementing class), otherwise this method might throw an exception. If the Parcelable class does not enclose the CREATOR, use the deprecated `https://developer.android.com/reference/android/os/Bundle#getParcelableArray(java.lang.String)` instead.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or `null` <br /> |
| `clazz` | `Class`: The type of the items inside the array. This is only verified when unparceling. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `T[]` | a Parcelable\[\] value, or `null` <br /> |

### getParcelableArray

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Parcelable[] getParcelableArray (String key)
```

<br />

**This method was deprecated in API level 33.**   

Use the type-safer `https://developer.android.com/reference/android/os/Bundle#getParcelableArray(java.lang.String,%20java.lang.Class<T>)` starting from Android `https://developer.android.com/reference/android/os/Build.VERSION_CODES#TIRAMISU`.

Returns the value associated with the given key, or `null` if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

**Note:** if the expected value is not a class provided by the Android platform, you must call `https://developer.android.com/reference/android/os/Bundle#setClassLoader(java.lang.ClassLoader)` with the proper `https://developer.android.com/reference/java/lang/ClassLoader` first. Otherwise, this method might throw an exception or return `null`.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or `null` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/Parcelable` | a Parcelable\[\] value, or `null` <br /> |

### getParcelableArrayList

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ArrayList<T> getParcelableArrayList (String key, 
                Class<? extends T> clazz)
```

Returns the value associated with the given key, or `null` if:

- No mapping of the desired type exists for the given key.
- A `null` value is explicitly associated with the key.
- The object is not of type `clazz`.

**Note:** if the expected value is not a class provided by the Android platform, you must call `https://developer.android.com/reference/android/os/Bundle#setClassLoader(java.lang.ClassLoader)` with the proper `https://developer.android.com/reference/java/lang/ClassLoader` first. Otherwise, this method might throw an exception or return `null`.

**Warning:** if the list contains items implementing the `https://developer.android.com/reference/android/os/Parcelable` interface, the class that implements `https://developer.android.com/reference/android/os/Parcelable` has to be the immediately enclosing class of the runtime type of its CREATOR field (that is, `https://developer.android.com/reference/java/lang/Class#getEnclosingClass()` has to return the parcelable implementing class), otherwise this method might throw an exception. If the Parcelable class does not enclose the CREATOR, use the deprecated `https://developer.android.com/reference/android/os/Bundle#getParcelableArrayList(java.lang.String)` instead.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or `null` <br /> |
| `clazz` | `Class`: The type of the items inside the array list. This is only verified when unparceling. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/ArrayList<T>` | an ArrayList value, or `null` <br /> |

### getParcelableArrayList

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ArrayList<T> getParcelableArrayList (String key)
```

<br />

**This method was deprecated in API level 33.**   

Use the type-safer `https://developer.android.com/reference/android/os/Bundle#getParcelable(java.lang.String,%20java.lang.Class<T>)` starting from Android `https://developer.android.com/reference/android/os/Build.VERSION_CODES#TIRAMISU`.

Returns the value associated with the given key, or `null` if no mapping of the desired type exists for the given key or a `null` value is explicitly associated with the key.

**Note:** if the expected value is not a class provided by the Android platform, you must call `https://developer.android.com/reference/android/os/Bundle#setClassLoader(java.lang.ClassLoader)` with the proper `https://developer.android.com/reference/java/lang/ClassLoader` first. Otherwise, this method might throw an exception or return `null`.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or `null` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/ArrayList<T>` | an ArrayList value, or `null` <br /> |

### getSerializable

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public T getSerializable (String key, 
                Class<T> clazz)
```

Returns the value associated with the given key, or `null` if:

- No mapping of the desired type exists for the given key.
- A `null` value is explicitly associated with the key.
- The object is not of type `clazz`.

<br />

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `clazz` | `Class`: The expected class of the returned type. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `T` | a Serializable value, or null <br /> |

### getSerializable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Serializable getSerializable (String key)
```

<br />

**This method was deprecated in API level 33.**   

Use the type-safer `https://developer.android.com/reference/android/os/Bundle#getSerializable(java.lang.String,%20java.lang.Class<T>)` starting from Android `https://developer.android.com/reference/android/os/Build.VERSION_CODES#TIRAMISU`.

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/io/Serializable` | a Serializable value, or null <br /> |

### getShort

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public short getShort (String key)
```

Returns the value associated with the given key, or (short) 0 if no mapping of the desired type exists for the given key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String <br /> |

| Returns ||
|---|---|
| `short` | a short value <br /> |

### getShort

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public short getShort (String key, 
                short defaultValue)
```

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String <br /> |
| `defaultValue` | `short`: Value to return if key does not exist <br /> |

| Returns ||
|---|---|
| `short` | a short value <br /> |

### getShortArray

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public short[] getShortArray (String key)
```

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `short[]` | a short\[\] value, or null <br /> |

### getSize

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Size getSize (String key)
```

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/util/Size` | a Size value, or null <br /> |

### getSizeF

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public SizeF getSizeF (String key)
```

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/util/SizeF` | a Size value, or null <br /> |

### getSparseParcelableArray

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public SparseArray<T> getSparseParcelableArray (String key)
```

<br />

**This method was deprecated in API level 33.**   

Use the type-safer `https://developer.android.com/reference/android/os/Bundle#getSparseParcelableArray(java.lang.String,%20java.lang.Class<?%20extends%20T>)` starting from Android `https://developer.android.com/reference/android/os/Build.VERSION_CODES#TIRAMISU`.

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/util/SparseArray<T>` | a SparseArray of T values, or null <br /> |

### getSparseParcelableArray

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public SparseArray<T> getSparseParcelableArray (String key, 
                Class<? extends T> clazz)
```

Returns the value associated with the given key, or `null` if:

- No mapping of the desired type exists for the given key.
- A `null` value is explicitly associated with the key.
- The object is not of type `clazz`.

**Warning:** if the list contains items implementing the `https://developer.android.com/reference/android/os/Parcelable` interface, the class that implements `https://developer.android.com/reference/android/os/Parcelable` has to be the immediately enclosing class of the runtime type of its CREATOR field (that is, `https://developer.android.com/reference/java/lang/Class#getEnclosingClass()` has to return the parcelable implementing class), otherwise this method might throw an exception. If the Parcelable class does not enclose the CREATOR, use the deprecated `https://developer.android.com/reference/android/os/Bundle#getSparseParcelableArray(java.lang.String)` instead.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `clazz` | `Class`: The type of the items inside the sparse array. This is only verified when unparceling. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/util/SparseArray<T>` | a SparseArray of T values, or null <br /> |

### getStringArrayList

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ArrayList<String> getStringArrayList (String key)
```

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/java/lang/String>` | an ArrayList value, or null <br /> |

### hasFileDescriptors

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean hasFileDescriptors ()
```

Reports whether the bundle contains any parcelled file descriptors.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### putAll

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putAll (Bundle bundle)
```

Inserts all mappings from the given Bundle into this Bundle.

<br />

| Parameters ||
|---|---|
| `bundle` | `Bundle`: a Bundle <br /> |

### putBinder

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putBinder (String key, 
                IBinder value)
```

Inserts an `https://developer.android.com/reference/android/os/IBinder` value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

You should be very careful when using this function. In many places where Bundles are used (such as inside of Intent objects), the Bundle can live longer inside of another process than the process that had originally created it. In that case, the IBinder you supply here will become invalid when your process goes away, and no longer usable, even if a new process is created for you later on.

<br />

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `IBinder`: an IBinder object, or null <br /> |

### putBundle

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putBundle (String key, 
                Bundle value)
```

Inserts a Bundle value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `Bundle`: a Bundle object, or null <br /> |

### putByte

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putByte (String key, 
                byte value)
```

Inserts a byte value into the mapping of this Bundle, replacing any existing value for the given key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `byte`: a byte <br /> |

### putByteArray

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putByteArray (String key, 
                byte[] value)
```

Inserts a byte array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `byte`: a byte array object, or null <br /> |

### putChar

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putChar (String key, 
                char value)
```

Inserts a char value into the mapping of this Bundle, replacing any existing value for the given key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `char`: a char <br /> |

### putCharArray

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putCharArray (String key, 
                char[] value)
```

Inserts a char array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `char`: a char array object, or null <br /> |

### putCharSequence

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putCharSequence (String key, 
                CharSequence value)
```

Inserts a CharSequence value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `CharSequence`: a CharSequence, or null <br /> |

### putCharSequenceArray

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putCharSequenceArray (String key, 
                CharSequence[] value)
```

Inserts a CharSequence array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `CharSequence`: a CharSequence array object, or null <br /> |

### putCharSequenceArrayList

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putCharSequenceArrayList (String key, 
                ArrayList<CharSequence> value)
```

Inserts an ArrayList value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `ArrayList`: an ArrayList object, or null <br /> |

### putFloat

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putFloat (String key, 
                float value)
```

Inserts a float value into the mapping of this Bundle, replacing any existing value for the given key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `float`: a float <br /> |

### putFloatArray

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putFloatArray (String key, 
                float[] value)
```

Inserts a float array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `float`: a float array object, or null <br /> |

### putIntegerArrayList

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putIntegerArrayList (String key, 
                ArrayList<Integer> value)
```

Inserts an ArrayList value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `ArrayList`: an ArrayList object, or null <br /> |

### putParcelable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putParcelable (String key, 
                Parcelable value)
```

Inserts a Parcelable value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `Parcelable`: a Parcelable object, or null <br /> |

### putParcelableArray

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putParcelableArray (String key, 
                Parcelable[] value)
```

Inserts an array of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `Parcelable`: an array of Parcelable objects, or null <br /> |

### putParcelableArrayList

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putParcelableArrayList (String key, 
                ArrayList<? extends Parcelable> value)
```

Inserts a List of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `ArrayList`: an ArrayList of Parcelable objects, or null <br /> |

### putSerializable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putSerializable (String key, 
                Serializable value)
```

Inserts a Serializable value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `Serializable`: a Serializable object, or null <br /> |

### putShort

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putShort (String key, 
                short value)
```

Inserts a short value into the mapping of this Bundle, replacing any existing value for the given key.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `short`: a short <br /> |

### putShortArray

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putShortArray (String key, 
                short[] value)
```

Inserts a short array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `short`: a short array object, or null <br /> |

### putSize

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putSize (String key, 
                Size value)
```

Inserts a Size value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `Size`: a Size object, or null <br /> |

### putSizeF

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putSizeF (String key, 
                SizeF value)
```

Inserts a SizeF value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `SizeF`: a SizeF object, or null <br /> |

### putSparseParcelableArray

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putSparseParcelableArray (String key, 
                SparseArray<? extends Parcelable> value)
```

Inserts a SparceArray of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `SparseArray`: a SparseArray of Parcelable objects, or null <br /> |

### putStringArrayList

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void putStringArrayList (String key, 
                ArrayList<String> value)
```

Inserts an ArrayList value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String, or null <br /> |
| `value` | `ArrayList`: an ArrayList object, or null <br /> |

### readFromParcel

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void readFromParcel (Parcel parcel)
```

Reads the Parcel contents into this Bundle, typically in order for it to be passed through an IBinder connection.

<br />

| Parameters ||
|---|---|
| `parcel` | `Parcel`: The parcel to overwrite this bundle from. <br /> |

### remove

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void remove (String key)
```

Removes any entry with the given key from the mapping of this Bundle.

<br />

| Parameters ||
|---|---|
| `key` | `String`: a String key <br /> |

### setClassLoader

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setClassLoader (ClassLoader loader)
```

Changes the ClassLoader this Bundle uses when instantiating objects.

<br />

| Parameters ||
|---|---|
| `loader` | `ClassLoader`: An explicit ClassLoader to use when instantiating objects inside of the Bundle. <br /> |

### toString

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string representation of the `https://developer.android.com/reference/android/os/Bundle` that may be suitable for debugging. It won't print the internal map if its content hasn't been unparcelled.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### writeToParcel

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void writeToParcel (Parcel parcel, 
                int flags)
```

Writes the Bundle contents to a Parcel, typically in order for it to be passed through an IBinder connection.

<br />

| Parameters ||
|---|---|
| `parcel` | `Parcel`: The parcel to copy this bundle to. <br /> |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` |