语言

Notification.ForegroundServiceImmediate 字段

定义

注意

This constant will be removed in the future version. Use Android.App.NotificationForegroundService enum directly instead of this field.

如果使用 Notification.Builder.setForegroundServiceBehavior(int) 生成了与启动前台服务的通知,则即使默认行为将延迟短时间,通知的显示也会立即显示。

[Android.Runtime.Register("FOREGROUND_SERVICE_IMMEDIATE", ApiSince=31)]
[System.Obsolete("This constant will be removed in the future version. Use Android.App.NotificationForegroundService enum directly instead of this field.", true)]
public const Android.App.NotificationForegroundService ForegroundServiceImmediate = 1;
[<Android.Runtime.Register("FOREGROUND_SERVICE_IMMEDIATE", ApiSince=31)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.App.NotificationForegroundService enum directly instead of this field.", true)>]
val mutable ForegroundServiceImmediate : Android.App.NotificationForegroundService

字段值

Value = 1

实现

特性

注解

如果使用 Notification.Builder.setForegroundServiceBehavior(int) 生成了与启动前台服务的通知,则即使默认行为将延迟短时间,通知的显示也会立即显示。 值为下列值之一:FOREGROUND_SERVICE_DEFAULT FOREGROUND_SERVICE_IMMEDIATE FOREGROUND_SERVICE_DEFERRED

Android 参考。android.app.Notification.FOREGROUND_SERVICE_IMMEDIATE

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于