NotificationDisplayService

A service that provides information for clients responsible for displaying notifications to the user.

The client of this service will typically be a system UI, which uses this information to decide when to display certain notifications to the user.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The policy that the client should use to determine which incoming notifications to suppress, preventing them from being presented to the user.

Link copied to clipboard

Whether previously suppressed notifications (e.g., due to notificationSuppressionPolicy) should be presented to the user.

Functions

Link copied to clipboard
abstract suspend fun setNumberOfNotifications(numberOfNotifications: Int)

Informs the service of how many active notifications there are in total. This includes both visible notifications and hidden notifications. (Note that notifications may be hidden through mechanisms other than suppression as well, such as a timeout or user interaction.)

Link copied to clipboard
abstract suspend fun setNumberOfSuppressedNotifications(numberOfSuppressedNotifications: Int)

Informs the service of how many active notifications were not presented to the user because they were suppressed. E.g., due to notificationSuppressionPolicy.