ServiceInfo.ForegroundServiceTypeMediaPlayback 字段
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注意
This constant will be removed in the future version. Use Android.Content.PM.ForegroundService enum directly instead of this field.
与特性中android.R.attr#foregroundServiceType
对应的mediaPlayback
常量。
[Android.Runtime.Register("FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK", ApiSince=29)]
[Android.Runtime.RequiresPermission("android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK")]
[System.Obsolete("This constant will be removed in the future version. Use Android.Content.PM.ForegroundService enum directly instead of this field.", true)]
public const Android.Content.PM.ForegroundService ForegroundServiceTypeMediaPlayback = 2;
[<Android.Runtime.Register("FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK", ApiSince=29)>]
[<Android.Runtime.RequiresPermission("android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK")>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Content.PM.ForegroundService enum directly instead of this field.", true)>]
val mutable ForegroundServiceTypeMediaPlayback : Android.Content.PM.ForegroundService
字段值
Value = 2实现
- 属性
注解
与特性中android.R.attr#foregroundServiceType
对应的mediaPlayback
常量。 音乐、视频、新闻或其他媒体播放。
从面向 API 级别的 android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE
应用启动具有此类型的前台服务需要权限 android.Manifest.permission#FOREGROUND_SERVICE_MEDIA_PLAYBACK
。
适用于 . 的 android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK
Java 文档
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。