Android Guides | Samples

Android.Content.BroadcastReceiver.SetResult Method

Change all of the result data returned from this broadcasts; only works with broadcasts sent through Context.SendOrderedBroadcast(Intent,String).

Syntax

[Android.Runtime.Register("setResult", "(ILjava/lang/String;Landroid/os/Bundle;)V", "")]
public Void SetResult ([Android.Runtime.GeneratedEnum] Result code, String data, Bundle extras)

Parameters

code
The new result code. Often uses the Activity Result.Canceled and Result.Ok constants, though the actual meaning of this value is ultimately up to the broadcaster.
data
The new result data. This is an arbitrary string whose interpretation is up to the broadcaster; may be null.
extras
The new extra data map. This is a Bundle holding arbitrary data, whose interpretation is up to the broadcaster. Can be set to null. This completely replaces the current map (if any).

Remarks

Change all of the result data returned from this broadcasts; only works with broadcasts sent through Context.SendOrderedBroadcast(Intent,String). All current result data is replaced by the value given to this method.

This method does not work with non-ordered broadcasts such as those sent with Context.SendBroadcast(Intent)

[Android Documentation]

Requirements

Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1