Sdílet prostřednictvím


Message.Data Property

Definition

Obtains a Bundle of arbitrary data associated with this event, lazily creating it if necessary. -or- Sets a Bundle of arbitrary data values.

public Android.OS.Bundle? Data { [Android.Runtime.Register("getData", "()Landroid/os/Bundle;", "")] get; [Android.Runtime.Register("setData", "(Landroid/os/Bundle;)V", "")] set; }
[<get: Android.Runtime.Register("getData", "()Landroid/os/Bundle;", "")>]
[<set: Android.Runtime.Register("setData", "(Landroid/os/Bundle;)V", "")>]
member this.Data : Android.OS.Bundle with get, set

Property Value

Attributes

Remarks

Property getter documentation:

Obtains a Bundle of arbitrary data associated with this event, lazily creating it if necessary. Set this value by calling #setData(Bundle). Note that when transferring data across processes via Messenger, you will need to set your ClassLoader on the Bundle via Bundle#setClassLoader(ClassLoader) Bundle.setClassLoader() so that it can instantiate your objects when you retrieve them.

Java documentation for android.os.Message.getData().

Property setter documentation:

Sets a Bundle of arbitrary data values. Use arg1 and arg2 members as a lower cost way to send a few simple integer values, if you can.

Java documentation for android.os.Message.setData(android.os.Bundle).

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.

Applies to

See also