Android.Service.Notification Namespace

Provides notification listeners, notification ranking data, and automatic Do Not Disturb policy types.

Classes

Name Description
Condition

The current condition of an android.app.AutomaticZenRule, provided by the app that owns the rule.

Condition.InterfaceConsts

Provides the Parcelable constants exposed for Condition.

ConditionProviderService

A service that provides conditions about boolean state.

NotificationListenerService

A service that receives calls from the system when new notifications are posted or removed, or their ranking changed.

NotificationListenerService.Ranking

Stores ranking related information on a currently active notification.

NotificationListenerService.RankingMap

Provides access to ranking information on currently active notifications.

NotificationListenerService.RankingMap.InterfaceConsts

Provides the Parcelable constants exposed for NotificationListenerService.RankingMap.

StatusBarNotification

Class encapsulating a Notification.

StatusBarNotification.InterfaceConsts

Provides the Parcelable constants exposed for StatusBarNotification.

ZenDeviceEffects

Represents the set of device effects (affecting display and device behavior in general) that are applied whenever an android.app.AutomaticZenRule is active.

ZenDeviceEffects.Builder

Builder class for ZenDeviceEffects objects.

ZenDeviceEffects.InterfaceConsts

Provides the Parcelable constants exposed for ZenDeviceEffects.

ZenPolicy

ZenPolicy determines whether to allow certain notifications and their corresponding sounds to play when a device is in Do Not Disturb mode.

ZenPolicy.Builder

Builder class for ZenPolicy objects.

ZenPolicy.InterfaceConsts

Provides the Parcelable constants exposed for ZenPolicy.

Enums

Name Description
AudienceType

Selects which callers or message senders can bypass Do Not Disturb.

ConditionFlags

Specifies the relevance bits stored in a condition.

ConditionSource

Identifies the cause of a condition state change.

ConditionState

Identifies the state reported for an automatic Do Not Disturb rule.

ConversationSenders

Selects which conversation notifications can bypass Do Not Disturb.

FlagFilterType

Specifies the notification types that a listener receives.

InterruptionFilterType

Identifies the current notification interruption filter.

NotificationCancelReason

Identifies why a notification was removed.

NotificationChannelOrGroupEventType

Identifies a change to a notification channel or channel group.

NotificationListenerServiceHint

Specifies requests to suppress effects on the host device.

StateType

Specifies whether a Do Not Disturb policy allows a sound or visual effect.

SuppressEffect

Specifies visual notification effects to suppress while the screen is on or off.

UserSentiment

Describes the system's estimate of user sentiment toward a notification channel.

Remarks

NotificationListenerService receives notification updates. Condition, ZenPolicy, and ZenDeviceEffects describe automatic Do Not Disturb rules and their effects.