语言

Notification.Builder.SetOnlyAlertOnce(Boolean) 方法

定义

如果只希望播放声音、振动和滴答声(如果通知尚未显示),请设置此标志。

[Android.Runtime.Register("setOnlyAlertOnce", "(Z)Landroid/app/Notification$Builder;", "GetSetOnlyAlertOnce_ZHandler")]
public virtual Android.App.Notification.Builder SetOnlyAlertOnce(bool onlyAlertOnce);
[<Android.Runtime.Register("setOnlyAlertOnce", "(Z)Landroid/app/Notification$Builder;", "GetSetOnlyAlertOnce_ZHandler")>]
abstract member SetOnlyAlertOnce : bool -> Android.App.Notification.Builder
override this.SetOnlyAlertOnce : bool -> Android.App.Notification.Builder

参数

onlyAlertOnce
Boolean

boolean

返回

此 Android.App.Notification.Builder 实例允许链接调用。

特性

注解

如果只希望播放声音、振动和滴答声(如果通知尚未显示),请设置此标志。 请注意,使用此标志将停止任何正在进行的警报行为,如声音、振动或闪烁通知 LED。

Android 参考。android.app.Notification.Builder.setOnlyAlertOnce

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

适用于

另请参阅