语言

NotificationManager.AreBubblesAllowed 方法

定义

获取此应用发布的所有通知是否可以显示在通知阴影之外,并浮动在其他应用的内容上。

[Android.Runtime.Register("areBubblesAllowed", "()Z", "GetAreBubblesAllowedHandler", ApiSince=29)]
public virtual bool AreBubblesAllowed();
[<Android.Runtime.Register("areBubblesAllowed", "()Z", "GetAreBubblesAllowedHandler", ApiSince=29)>]
abstract member AreBubblesAllowed : unit -> bool
override this.AreBubblesAllowed : unit -> bool

返回

true 当应用程序的设置允许所有其他符合条件的通知冒泡时;否则,为 false. 通道限制仍适用。

特性

注解

此方法在 API 级别 31 中已弃用。 请改用 getBubblePreference()。

获取此应用发布的所有通知是否可以显示在通知阴影之外,并浮动在其他应用的内容上。 对于发布到不允许气泡(NotificationChannel.canBubble()的通道的通知,将忽略此值。

Android 参考。android.app.NotificationManager.areBubblesAllowed

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

适用于