Språk

BroadcastOptions.ToBundle Method

Definition

Returns the options as a Bundle for broadcast methods that accept one.

[Android.Runtime.Register("toBundle", "()Landroid/os/Bundle;", "GetToBundleHandler", ApiSince=34)]
public virtual Android.OS.Bundle ToBundle();
[<Android.Runtime.Register("toBundle", "()Landroid/os/Bundle;", "GetToBundleHandler", ApiSince=34)>]
abstract member ToBundle : unit -> Android.OS.Bundle
override this.ToBundle : unit -> Android.OS.Bundle

Returns

This value cannot be null.

Attributes

Remarks

Returns the created options as a Bundle, which can be passed to the broadcast methods that take an options Bundle. Do not modify the returned Bundle.

Throws: IllegalStateException if the broadcast option values are inconsistent. For example, if the delivery group policy is specified as "MERGED" but no extras merger is supplied.

Android reference for android.app.BroadcastOptions.toBundle.

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