共用方式為


BroadcastReceiver.SetResultExtras(Bundle) Method

Definition

Change the current result extras of this broadcast; only works with broadcasts sent through Context#sendOrderedBroadcast(Intent, String) Context.sendOrderedBroadcast.

[Android.Runtime.Register("setResultExtras", "(Landroid/os/Bundle;)V", "")]
public void SetResultExtras (Android.OS.Bundle? extras);
[<Android.Runtime.Register("setResultExtras", "(Landroid/os/Bundle;)V", "")>]
member this.SetResultExtras : Android.OS.Bundle -> unit

Parameters

extras
Bundle

The new extra data map; may be null.

Attributes

Remarks

Change the current result extras of this broadcast; only works with broadcasts sent through Context#sendOrderedBroadcast(Intent, String) Context.sendOrderedBroadcast. This is a Bundle holding arbitrary data, whose interpretation is up to the broadcaster. Can be set to null. Calling this method completely replaces the current map (if any).

<strong>This method does not work with non-ordered broadcasts such as those sent with Context#sendBroadcast(Intent) Context.sendBroadcast</strong>

Java documentation for android.content.BroadcastReceiver.setResultExtras(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

  • <xref:Android.Content.BroadcastReceiver.SetResult(Android.App.Result%2c+System.String%2c+System.String)>