Notification.Builder.SetOngoing(Boolean) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
设置此通知是否为“持续”通知。
[Android.Runtime.Register("setOngoing", "(Z)Landroid/app/Notification$Builder;", "GetSetOngoing_ZHandler")]
public virtual Android.App.Notification.Builder SetOngoing(bool ongoing);
[<Android.Runtime.Register("setOngoing", "(Z)Landroid/app/Notification$Builder;", "GetSetOngoing_ZHandler")>]
abstract member SetOngoing : bool -> Android.App.Notification.Builder
override this.SetOngoing : bool -> Android.App.Notification.Builder
参数
- ongoing
- Boolean
boolean
返回
此 Android.App.Notification.Builder 实例允许链接调用。
- 特性
注解
设置此通知是否为“持续”通知。 锁定设备上的用户或通知侦听器无法消除正在进行的通知,某些通知(呼叫、设备管理、媒体)无法在解锁的设备上消除,因此应用程序或服务必须负责取消这些通知。 它们通常用于指示用户主动参与(例如播放音乐)或以某种方式挂起的后台任务(例如文件下载、同步操作、活动网络连接)。
Android 参考。android.app.Notification.Builder.setOngoing
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。