Aracılığıyla paylaş


Activity.CreatePendingResult(Int32, Intent, PendingIntentFlags) Method

Definition

Create a new PendingIntent object which you can hand to others for them to use to send result data back to your #onActivityResult callback.

[Android.Runtime.Register("createPendingResult", "(ILandroid/content/Intent;I)Landroid/app/PendingIntent;", "GetCreatePendingResult_ILandroid_content_Intent_IHandler")]
public virtual Android.App.PendingIntent? CreatePendingResult (int requestCode, Android.Content.Intent data, Android.App.PendingIntentFlags flags);
[<Android.Runtime.Register("createPendingResult", "(ILandroid/content/Intent;I)Landroid/app/PendingIntent;", "GetCreatePendingResult_ILandroid_content_Intent_IHandler")>]
abstract member CreatePendingResult : int * Android.Content.Intent * Android.App.PendingIntentFlags -> Android.App.PendingIntent
override this.CreatePendingResult : int * Android.Content.Intent * Android.App.PendingIntentFlags -> Android.App.PendingIntent

Parameters

requestCode
Int32

Private request code for the sender that will be associated with the result data when it is returned. The sender can not modify this value, allowing you to identify incoming results.

data
Intent

Default data to supply in the result, which may be modified by the sender.

flags
PendingIntentFlags

May be PendingIntent#FLAG_ONE_SHOT PendingIntent.FLAG_ONE_SHOT, PendingIntent#FLAG_NO_CREATE PendingIntent.FLAG_NO_CREATE, PendingIntent#FLAG_CANCEL_CURRENT PendingIntent.FLAG_CANCEL_CURRENT, PendingIntent#FLAG_UPDATE_CURRENT PendingIntent.FLAG_UPDATE_CURRENT, or any of the flags as supported by Intent#fillIn Intent.fillIn() to control which unspecified parts of the intent that can be supplied when the actual send happens.

Returns

Returns an existing or new PendingIntent matching the given parameters. May return null only if PendingIntent#FLAG_NO_CREATE PendingIntent.FLAG_NO_CREATE has been supplied.

Attributes

Remarks

Create a new PendingIntent object which you can hand to others for them to use to send result data back to your #onActivityResult callback. The created object will be either one-shot (becoming invalid after a result is sent back) or multiple (allowing any number of results to be sent through it).

Java documentation for android.app.Activity.createPendingResult(int, android.content.Intent, int).

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