Android Guides | Samples

Android.App.PendingIntentFlags Enumeration

Enumerates values returned by several methods of PendingIntentFlags and taken as a parameter of several types.

Syntax

[System.Flags]
public enum PendingIntentFlags

Remarks

Members

Member NameDescription
CancelCurrentFlag for use with PendingIntent.GetActivity(Context,Int32,Int32,Int32), PendingIntent.GetBroadcast(Context,Int32,Int32,Int32), and PendingIntent.GetService(Context,Int32,Int32,Int32): if the described PendingIntent already exists, the current one is canceled before generating a new one. You can use this to retrieve a new PendingIntent when you are only changing the extra data in the Intent; by canceling the previous pending intent, this ensures that only entities given the new data will be able to launch it. If this assurance is not an issue, consider PendingIntentFlags.UpdateCurrent.
NoCreateFlag for use with PendingIntent.GetActivity(Context,Int32,Int32,Int32), PendingIntent.GetBroadcast(Context,Int32,Int32,Int32), and PendingIntent.GetService(Context,Int32,Int32,Int32): if the described PendingIntent does not already exist, then simply return null instead of creating it.
OneShotFlag for use with PendingIntent.GetActivity(Context,Int32,Int32,Int32), PendingIntent.GetBroadcast(Context,Int32,Int32,Int32), and PendingIntent.GetService(Context,Int32,Int32,Int32): this PendingIntent can only be used once. If set, after PendingIntent.Send is called on it, it will be automatically canceled for you and any future attempt to send through it will fail.
UpdateCurrentFlag for use with PendingIntent.GetActivity(Context,Int32,Int32,Int32), PendingIntent.GetBroadcast(Context,Int32,Int32,Int32), and PendingIntent.GetService(Context,Int32,Int32,Int32): if the described PendingIntent already exists, then keep it but its replace its extra data with what is in this new Intent. This can be used if you are creating intents where only the extras change, and don't care that any entities that received your previous PendingIntent will be able to launch it with your new extras even if they are not explicitly given to it.

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0

The members of Android.App.PendingIntentFlags are listed below.

See Also: Enum

Public Fields

CancelCurrentPendingIntentFlags. Flag for use with PendingIntent.GetActivity(Context,Int32,Int32,Int32), PendingIntent.GetBroadcast(Context,Int32,Int32,Int32), and PendingIntent.GetService(Context,Int32,Int32,Int32): if the described PendingIntent already exists, the current one is canceled before generating a new one. You can use this to retrieve a new PendingIntent when you are only changing the extra data in the Intent; by canceling the previous pending intent, this ensures that only entities given the new data will be able to launch it. If this assurance is not an issue, consider PendingIntentFlags.UpdateCurrent.
NoCreatePendingIntentFlags. Flag for use with PendingIntent.GetActivity(Context,Int32,Int32,Int32), PendingIntent.GetBroadcast(Context,Int32,Int32,Int32), and PendingIntent.GetService(Context,Int32,Int32,Int32): if the described PendingIntent does not already exist, then simply return null instead of creating it.
OneShotPendingIntentFlags. Flag for use with PendingIntent.GetActivity(Context,Int32,Int32,Int32), PendingIntent.GetBroadcast(Context,Int32,Int32,Int32), and PendingIntent.GetService(Context,Int32,Int32,Int32): this PendingIntent can only be used once. If set, after PendingIntent.Send is called on it, it will be automatically canceled for you and any future attempt to send through it will fail.
UpdateCurrentPendingIntentFlags. Flag for use with PendingIntent.GetActivity(Context,Int32,Int32,Int32), PendingIntent.GetBroadcast(Context,Int32,Int32,Int32), and PendingIntent.GetService(Context,Int32,Int32,Int32): if the described PendingIntent already exists, then keep it but its replace its extra data with what is in this new Intent. This can be used if you are creating intents where only the extras change, and don't care that any entities that received your previous PendingIntent will be able to launch it with your new extras even if they are not explicitly given to it.