NotificationChannel.Importance 属性

定义

返回用户指定的重要性 e. - 或 - 设置此通知通道的中断级别。

public Android.App.NotificationImportance Importance { [Android.Runtime.Register("getImportance", "()I", "", ApiSince=26)] get; [Android.Runtime.Register("setImportance", "(I)V", "", ApiSince=26)] set; }
[<get: Android.Runtime.Register("getImportance", "()I", "", ApiSince=26)>]
[<set: Android.Runtime.Register("setImportance", "(I)V", "", ApiSince=26)>]
member this.Importance : Android.App.NotificationImportance with get, set

属性值

属性

注解

属性 getter 文档:

返回用户指定的重要性,例如 NotificationManager#IMPORTANCE_LOW 发布到此通道的通知。 注意:此值可能是 >NotificationManager#IMPORTANCE_NONE,但如果父 NotificationChannelGroup 级或应用被阻止,则不会向用户显示发布到此通道的通知。 请参见 NotificationChannelGroup#isBlocked()NotificationManager#areNotificationsEnabled()

适用于 . 的 android.app.NotificationChannel.getImportance()Java 文档

属性 setter 文档:

设置此通知通道的中断级别。

仅在将通道提交到 NotificationManager#createNotificationChannel(NotificationChannel)之前可修改。

适用于 . 的 android.app.NotificationChannel.setImportance(int)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于