Språk

NotificationForegroundService Enum

Definition

Selects immediate, deferred, or default presentation of foreground-service notifications.

public enum NotificationForegroundService
type NotificationForegroundService = 
Inheritance
NotificationForegroundService

Fields

Name Value Description
Default 0

If the Notification associated with starting a foreground service has been built using Notification.Builder.setForegroundServiceBehavior(int) with this behavior, display of the notification will usually be suppressed for a short time to avoid visual disturbances to the user.

Immediate 1

If the Notification associated with starting a foreground service has been built using Notification.Builder.setForegroundServiceBehavior(int) with this behavior, display of the notification will be immediate even if the default behavior would be to defer visibility for a short time.

Deferred 2

If the Notification associated with starting a foreground service has been built using Notification.Builder.setForegroundServiceBehavior(int) with this behavior, display of the notification will usually be suppressed for a short time to avoid visual disturbances to the user.

Applies to