Android.App.PendingIntent.GetActivities Method
Like PendingIntent.GetActivity(Android.Content.Context, System.Int32, System.Int32, System.Int32), but allows an array of Intents to be supplied.

Syntax

[Android.Runtime.Register("getActivities", "(Landroid/content/Context;I[Landroid/content/Intent;I)Landroid/app/PendingIntent;", "")]
public static PendingIntent GetActivities (Android.Content.Context context, int requestCode, Android.Content.Intent[] intents, [Android.Runtime.GeneratedEnum] PendingIntentFlags flags)

Parameters

context
The Context in which this PendingIntent should start the activity.
requestCode
Private request code for the sender
intents
Array of Intents of the activities to be launched.
flags
May be PendingIntent.FLAG_ONE_SHOT, PendingIntent.FLAG_NO_CREATE, PendingIntent.FLAG_CANCEL_CURRENT, PendingIntent.FLAG_UPDATE_CURRENT, or any of the flags as supported by Android.Content.Intent.FillIn(Android.Content.Intent, Android.Content.FillInFlags) to control which unspecified parts of the intent that can be supplied when the actual send happens.

Returns

Documentation for this section has not yet been entered.

Remarks

Like PendingIntent.GetActivity(Android.Content.Context, System.Int32, System.Int32, System.Int32), but allows an array of Intents to be supplied. The last Intent in the array is taken as the primary key for the PendingIntent, like the single Intent given to PendingIntent.GetActivity(Android.Content.Context, System.Int32, System.Int32, System.Int32). Upon sending the resulting PendingIntent, all of the Intents are started in the same way as they would be by passing them to Android.Content.Context.StartActivities(Android.Content.Intent[]).

The first intent in the array will be started outside of the context of an existing activity, so you must use the Android.Content.Intent.FLAG_ACTIVITY_NEW_TASK launch flag in the Intent. (Activities after the first in the array are started in the context of the previous activity in the array, so FLAG_ACTIVITY_NEW_TASK is not needed nor desired for them.)

The last intent in the array represents the key for the PendingIntent. In other words, it is the significant element for matching (as done with the single intent given to PendingIntent.GetActivity(Android.Content.Context, System.Int32, System.Int32, System.Int32), its content will be the subject of replacement by PendingIntent.Send(Android.Content.Context, Android.App.Result, Android.App.Result) and PendingIntent.FLAG_UPDATE_CURRENT, etc. This is because it is the most specific of the supplied intents, and the UI the user actually sees when the intents are started.

For security reasons, the Android.Content.Intent objects you supply here should almost always be explicit intents, that is specify an explicit component to be delivered to through Android.Content.Intent.setClass(android.content.Context, java.lang.Class<?>)

[Android Documentation]

Requirements

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