Language

NotificationCancelReason Enum

Definition

public enum NotificationCancelReason
type NotificationCancelReason = 
Inheritance
NotificationCancelReason

Fields

Name Value Description
Click 1

Notification was canceled by the status bar reporting a notification click.

Android reference for android.service.notification.NotificationListenerService.REASON_CLICK.

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.

Cancel 2

Notification was canceled by the status bar reporting a user dismissal.

Android reference for android.service.notification.NotificationListenerService.REASON_CANCEL.

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.

CancelAll 3

Notification was canceled by the status bar reporting that a user dismissed all notifications.

Android reference for android.service.notification.NotificationListenerService.REASON_CANCEL_ALL.

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.

Error 4

Notification was canceled by the status bar reporting an inflation error.

Android reference for android.service.notification.NotificationListenerService.REASON_ERROR.

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.

PackageChanged 5

Notification was canceled by the package manager modifying the package.

Android reference for android.service.notification.NotificationListenerService.REASON_PACKAGE_CHANGED.

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.

UserStopped 6

Notification was canceled by the owning user context being stopped.

Android reference for android.service.notification.NotificationListenerService.REASON_USER_STOPPED.

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.

PackageBanned 7

Notification was canceled by the user banning the package.

Android reference for android.service.notification.NotificationListenerService.REASON_PACKAGE_BANNED.

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.

AppCancel 8

Notification was canceled by the app canceling this specific notification.

Android reference for android.service.notification.NotificationListenerService.REASON_APP_CANCEL.

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.

AppCancelAll 9

Notification was canceled by the app cancelling all its notifications.

Android reference for android.service.notification.NotificationListenerService.REASON_APP_CANCEL_ALL.

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.

ListenerCancel 10

Notification was canceled by a listener reporting a user dismissal.

Android reference for android.service.notification.NotificationListenerService.REASON_LISTENER_CANCEL.

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.

ListenerCancelAll 11

Notification was canceled by a listener reporting that a user dismissed all notifications.

Android reference for android.service.notification.NotificationListenerService.REASON_LISTENER_CANCEL_ALL.

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.

GroupSummaryCanceled 12

Notification was canceled because it was a member of a canceled group.

Android reference for android.service.notification.NotificationListenerService.REASON_GROUP_SUMMARY_CANCELED.

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.

GroupOptimization 13

Notification was canceled because it was an invisible member of a group.

Android reference for android.service.notification.NotificationListenerService.REASON_GROUP_OPTIMIZATION.

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.

PackageSuspended 14

Notification was canceled by the device administrator suspending the package.

Android reference for android.service.notification.NotificationListenerService.REASON_PACKAGE_SUSPENDED.

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.

ProfileTurnedOff 15

Notification was canceled by the owning managed profile being turned off.

Android reference for android.service.notification.NotificationListenerService.REASON_PROFILE_TURNED_OFF.

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.

Unautobundled 16

Autobundled summary notification was canceled because its group was unbundled

Android reference for android.service.notification.NotificationListenerService.REASON_UNAUTOBUNDLED.

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.

ChannelBanned 17

Notification was canceled by the user banning the channel.

Android reference for android.service.notification.NotificationListenerService.REASON_CHANNEL_BANNED.

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.

Snoozed 18

Notification was snoozed.

Android reference for android.service.notification.NotificationListenerService.REASON_SNOOZED.

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.

Timeout 19

Notification was canceled due to timeout

Android reference for android.service.notification.NotificationListenerService.REASON_TIMEOUT.

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.

ChannelRemoved 20

Notification was canceled due to the backing channel being deleted

Android reference for android.service.notification.NotificationListenerService.REASON_CHANNEL_REMOVED.

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.

ClearData 21

Notification was canceled due to the app's storage being cleared

Android reference for android.service.notification.NotificationListenerService.REASON_CLEAR_DATA.

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.

AssistantCancel 22

Notification was canceled due to an assistant adjustment update.

Android reference for android.service.notification.NotificationListenerService.REASON_ASSISTANT_CANCEL.

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.

Lockdown 23

Notification was canceled when entering lockdown mode, which turns off Smart Lock, fingerprint unlocking, and notifications on the lock screen. All the listeners shall ensure the canceled notifications are indeed removed on their end to prevent data leaking. When the user exits the lockdown mode, the removed notifications (due to lockdown) will be restored via NotificationListeners#notifyPostedLocked()

Android reference for android.service.notification.NotificationListenerService.REASON_LOCKDOWN.

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.

ReasonBundleDismissed 24

Notification was canceled because it was in a bundle (e.g. android.app.NotificationChannel.PROMOTIONS_ID) that was dismissed.

Android reference for android.service.notification.NotificationListenerService.REASON_BUNDLE_DISMISSED.

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.

Remarks

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