Android Guides | Samples

Android.App.NotificationFlags Enumeration

Enumerates values returned by several types.

Syntax

[System.Flags]
public enum NotificationFlags

Remarks

Members

Member NameDescription
AutoCancelBit to be bitwise-ored into the Notification.Flags field that should be set if the notification should be canceled when it is clicked by the user.
ForegroundServiceBit to be bitwise-ored into the Notification.Flags field that should be set if this notification represents a currently running service. This will normally be set for you by Service.StartForeground(Int32,Notification).
GroupSummary
HighPriorityObsolete flag indicating high-priority notifications; use the priority field instead.
InsistentBit to be bitwise-ored into the Notification.Flags field that if set, the audio will be repeated until the notification is cancelled or the notification window is opened.
LocalOnly
NoClearBit to be bitwise-ored into the Notification.Flags field that should be set if the notification should not be canceled when the user clicks the Clear all button.
OngoingEventBit to be bitwise-ored into the Notification.Flags field that should be set if this notification is in reference to something that is ongoing, like a phone call. It should not be set if this notification is in reference to something that happened at a particular point in time, like a missed phone call.
OnlyAlertOnceBit to be bitwise-ored into the Notification.Flags field that should be set if you want the sound and/or vibration play each time the notification is sent, even if it has not been canceled before that.
ShowLights

Notification.Flags

  • To turn the LED off, pass 0 in the alpha channel for colorARGB or 0 for both ledOnMS and ledOffMS.
  • To turn the LED on, pass 1 for ledOnMS and 0 for ledOffMS.
  • To flash the LED, pass the number of milliseconds that it should be on and off to ledOnMS and ledOffMS.

The alpha channel must be set for forward compatibility.

Requirements

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

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

See Also: Enum

Public Fields

AutoCancelNotificationFlags. Bit to be bitwise-ored into the Notification.Flags field that should be set if the notification should be canceled when it is clicked by the user.
ForegroundServiceNotificationFlags. Bit to be bitwise-ored into the Notification.Flags field that should be set if this notification represents a currently running service. This will normally be set for you by Service.StartForeground(Int32,Notification).
GroupSummaryNotificationFlags.
HighPriorityNotificationFlags. Obsolete flag indicating high-priority notifications; use the priority field instead.
InsistentNotificationFlags. Bit to be bitwise-ored into the Notification.Flags field that if set, the audio will be repeated until the notification is cancelled or the notification window is opened.
LocalOnlyNotificationFlags.
NoClearNotificationFlags. Bit to be bitwise-ored into the Notification.Flags field that should be set if the notification should not be canceled when the user clicks the Clear all button.
OngoingEventNotificationFlags. Bit to be bitwise-ored into the Notification.Flags field that should be set if this notification is in reference to something that is ongoing, like a phone call. It should not be set if this notification is in reference to something that happened at a particular point in time, like a missed phone call.
OnlyAlertOnceNotificationFlags. Bit to be bitwise-ored into the Notification.Flags field that should be set if you want the sound and/or vibration play each time the notification is sent, even if it has not been canceled before that.
ShowLightsNotificationFlags.

Notification.Flags

  • To turn the LED off, pass 0 in the alpha channel for colorARGB or 0 for both ledOnMS and ledOffMS.
  • To turn the LED on, pass 1 for ledOnMS and 0 for ledOffMS.
  • To flash the LED, pass the number of milliseconds that it should be on and off to ledOnMS and ledOffMS.

The alpha channel must be set for forward compatibility.