语言

DownloadManager.Request.SetShowRunningNotification(Boolean) 方法

定义

注意

deprecated

此方法在 API 级别 15 中已弃用。

[Android.Runtime.Register("setShowRunningNotification", "(Z)Landroid/app/DownloadManager$Request;", "GetSetShowRunningNotification_ZHandler")]
[System.Obsolete("deprecated")]
public virtual Android.App.DownloadManager.Request? SetShowRunningNotification(bool show);
[<Android.Runtime.Register("setShowRunningNotification", "(Z)Landroid/app/DownloadManager$Request;", "GetSetShowRunningNotification_ZHandler")>]
[<System.Obsolete("deprecated")>]
abstract member SetShowRunningNotification : bool -> Android.App.DownloadManager.Request
override this.SetShowRunningNotification : bool -> Android.App.DownloadManager.Request

参数

show
Boolean

布尔值:下载管理器是否应显示此下载的通知。

返回

此对象

特性

注解

此方法在 API 级别 15 中已弃用。 use setNotificationVisibility(int)

控制此下载运行时下载管理器是否发布系统通知。 如果启用,下载管理器会通过系统 NotificationManager 发布有关下载的通知。 默认情况下,会显示通知。 如果设置为 false,则需要权限android.permission.DOWNLOAD_WITHOUT_NOTIFICATION。

Android 参考。android.app.DownloadManager.Request.setShowRunningNotification

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

适用于