PersistableBundle PersistableBundle Class

Definition

A mapping from String values to various types that can be saved to persistent and later restored.

[Android.Runtime.Register("android/os/PersistableBundle", ApiSince=21, DoNotGenerateAcw=true)]
public sealed class PersistableBundle : Android.OS.BaseBundle, Android.OS.IParcelable, IDisposable, Java.Lang.ICloneable
type PersistableBundle = class
    inherit BaseBundle
    interface IParcelable
    interface IJavaObject
    interface IDisposable
    interface ICloneable
Inheritance
PersistableBundlePersistableBundle
Attributes
Implements

Remarks

Android platform documentation

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

PersistableBundle() PersistableBundle()

Constructs a new, empty PersistableBundle.

PersistableBundle(Int32) PersistableBundle(Int32)

Constructs a new, empty PersistableBundle sized to hold the given number of elements.

PersistableBundle(PersistableBundle) PersistableBundle(PersistableBundle)

Constructs a PersistableBundle containing a copy of the mappings from the given PersistableBundle.

Properties

Class Class

Returns the unique instance of Class that represents this object's class.

(Inherited from Object)
Creator Creator
Empty Empty
Handle Handle

The handle to the underlying Android instance.

(Inherited from Object)
IJavaObjectEx.IsProxy IJavaObjectEx.IsProxy Inherited from Object
IJavaObjectEx.KeyHandle IJavaObjectEx.KeyHandle Inherited from Object
IJavaObjectEx.NeedsActivation IJavaObjectEx.NeedsActivation Inherited from Object
IJavaPeerable.JniManagedPeerState IJavaPeerable.JniManagedPeerState Inherited from Object
IsEmpty IsEmpty

Returns true if the mapping of this Bundle is empty, false otherwise.

(Inherited from BaseBundle)
JniIdentityHashCode JniIdentityHashCode Inherited from Object
JniPeerMembers JniPeerMembers
PeerReference PeerReference Inherited from Object
ThresholdClass ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from BaseBundle)
ThresholdType ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from BaseBundle)

Methods

Clear() Clear()

Removes all elements from the mapping of this Bundle.

(Inherited from BaseBundle)
Clone() Clone()

Clones the current PersistableBundle.

ContainsKey(String) ContainsKey(String)

Returns true if the given key is contained in the mapping of this Bundle.

(Inherited from BaseBundle)
DeepCopy() DeepCopy()
DescribeContents() DescribeContents()

Report the nature of this Parcelable's contents

Dispose() Dispose() Inherited from Object
Dispose(Boolean) Dispose(Boolean) Inherited from Object
Equals(Object) Equals(Object)

Compares this instance with the specified object and indicates if they are equal.

(Inherited from Object)
Get(String) Get(String)

Returns the entry with the given key as an object.

(Inherited from BaseBundle)
GetBoolean(String) GetBoolean(String) Inherited from BaseBundle
GetBoolean(String, Boolean) GetBoolean(String, Boolean) Inherited from BaseBundle
GetBooleanArray(String) GetBooleanArray(String) Inherited from BaseBundle
GetDouble(String) GetDouble(String)

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

(Inherited from BaseBundle)
GetDouble(String, Double) GetDouble(String, Double)

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

(Inherited from BaseBundle)
GetDoubleArray(String) GetDoubleArray(String)

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.

(Inherited from BaseBundle)
GetHashCode() GetHashCode()

Returns an integer hash code for this object.

(Inherited from Object)
GetInt(String) GetInt(String)

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

(Inherited from BaseBundle)
GetInt(String, Int32) GetInt(String, Int32)

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

(Inherited from BaseBundle)
GetIntArray(String) GetIntArray(String)

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.

(Inherited from BaseBundle)
GetLong(String) GetLong(String)

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

(Inherited from BaseBundle)
GetLong(String, Int64) GetLong(String, Int64)

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

(Inherited from BaseBundle)
GetLongArray(String) GetLongArray(String)

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.

(Inherited from BaseBundle)
GetPersistableBundle(String) GetPersistableBundle(String)

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.

GetString(String) GetString(String)

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.

(Inherited from BaseBundle)
GetString(String, String) GetString(String, String)

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.

(Inherited from BaseBundle)
GetStringArray(String) GetStringArray(String)

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.

(Inherited from BaseBundle)
JavaFinalize() JavaFinalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)
KeySet() KeySet()

Returns a Set containing the Strings used as keys in this Bundle.

(Inherited from BaseBundle)
Notify() Notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyAll() NotifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
PutAll(PersistableBundle) PutAll(PersistableBundle)

Inserts all mappings from the given PersistableBundle into this BaseBundle.

(Inherited from BaseBundle)
PutBoolean(String, Boolean) PutBoolean(String, Boolean) Inherited from BaseBundle
PutBooleanArray(String, Boolean[]) PutBooleanArray(String, Boolean[]) Inherited from BaseBundle
PutDouble(String, Double) PutDouble(String, Double)

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

(Inherited from BaseBundle)
PutDoubleArray(String, Double[]) PutDoubleArray(String, Double[])

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

(Inherited from BaseBundle)
PutInt(String, Int32) PutInt(String, Int32)

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

(Inherited from BaseBundle)
PutIntArray(String, Int32[]) PutIntArray(String, Int32[])

Inserts an int array value into the mapping of this Bundle, replacing any existing value for the given key.

(Inherited from BaseBundle)
PutLong(String, Int64) PutLong(String, Int64)

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

(Inherited from BaseBundle)
PutLongArray(String, Int64[]) PutLongArray(String, Int64[])

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

(Inherited from BaseBundle)
PutPersistableBundle(String, PersistableBundle) PutPersistableBundle(String, PersistableBundle)

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

PutString(String, String) PutString(String, String)

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

(Inherited from BaseBundle)
PutStringArray(String, String[]) PutStringArray(String, String[])

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

(Inherited from BaseBundle)
Remove(String) Remove(String)

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

(Inherited from BaseBundle)
SetHandle(IntPtr, JniHandleOwnership) SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
Size() Size()

Returns the number of mappings contained in this Bundle.

(Inherited from BaseBundle)
ToArray<T>() ToArray<T>() Inherited from Object
ToString() ToString()

Returns a string containing a concise, human-readable description of this object.

(Inherited from Object)
UnregisterFromRuntime() UnregisterFromRuntime() Inherited from Object
Wait() Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)
Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
WriteToParcel(Parcel, ParcelableWriteFlags) WriteToParcel(Parcel, ParcelableWriteFlags)

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

Explicit Interface Implementations

IJavaObjectEx.ToLocalJniHandle() IJavaObjectEx.ToLocalJniHandle() Inherited from Object
IJavaPeerable.Disposed() IJavaPeerable.Disposed() Inherited from Object
IJavaPeerable.DisposeUnlessReferenced() IJavaPeerable.DisposeUnlessReferenced() Inherited from Object
IJavaPeerable.Finalized() IJavaPeerable.Finalized() Inherited from Object
IJavaPeerable.SetJniIdentityHashCode(Int32) IJavaPeerable.SetJniIdentityHashCode(Int32) Inherited from Object
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) Inherited from Object
IJavaPeerable.SetPeerReference(JniObjectReference) IJavaPeerable.SetPeerReference(JniObjectReference) Inherited from Object

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable) GetJniTypeName(IJavaPeerable)

Applies to