Notification.MediaStyle.SetRemotePlaybackInfo 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| SetRemotePlaybackInfo(ICharSequence, Int32, PendingIntent) |
对于与远程设备上播放关联的媒体通知,请提供设备信息,以替换媒体控件上的输出切换器芯片的默认值,以及当点击输出切换器芯片时,在支持此功能的设备上使用的意向。 |
| SetRemotePlaybackInfo(String, Int32, PendingIntent) |
对于与远程设备上播放关联的媒体通知,请提供设备信息,以替换媒体控件上的输出切换器芯片的默认值,以及当点击输出切换器芯片时,在支持此功能的设备上使用的意向。 |
SetRemotePlaybackInfo(ICharSequence, Int32, PendingIntent)
对于与远程设备上播放关联的媒体通知,请提供设备信息,以替换媒体控件上的输出切换器芯片的默认值,以及当点击输出切换器芯片时,在支持此功能的设备上使用的意向。
[Android.Runtime.Register("setRemotePlaybackInfo", "(Ljava/lang/CharSequence;ILandroid/app/PendingIntent;)Landroid/app/Notification$MediaStyle;", "GetSetRemotePlaybackInfo_Ljava_lang_CharSequence_ILandroid_app_PendingIntent_Handler", ApiSince=34)]
public virtual Android.App.Notification.MediaStyle SetRemotePlaybackInfo(Java.Lang.ICharSequence deviceName, int iconResource, Android.App.PendingIntent? chipIntent);
[<Android.Runtime.Register("setRemotePlaybackInfo", "(Ljava/lang/CharSequence;ILandroid/app/PendingIntent;)Landroid/app/Notification$MediaStyle;", "GetSetRemotePlaybackInfo_Ljava_lang_CharSequence_ILandroid_app_PendingIntent_Handler", ApiSince=34)>]
abstract member SetRemotePlaybackInfo : Java.Lang.ICharSequence * int * Android.App.PendingIntent -> Android.App.Notification.MediaStyle
override this.SetRemotePlaybackInfo : Java.Lang.ICharSequence * int * Android.App.PendingIntent -> Android.App.Notification.MediaStyle
参数
- deviceName
- ICharSequence
CharSequence:要显示的远程设备的名称。 此值不能为 null。
- iconResource
- Int32
int:表示设备的图标资源
- chipIntent
- PendingIntent
PendingIntent:点击输出切换器时要发送的 PendingIntent。 可以为 null,在这种情况下,将禁用输出切换器。 此意向应打开活动,否则将被忽略。
返回
MediaStyle。 此值不能为 null。
- 特性
注解
对于与远程设备上播放关联的媒体通知,请提供设备信息,以替换媒体控件上的输出切换器芯片的默认值,以及当点击输出切换器芯片时,在支持此功能的设备上使用的意向。 此方法旨在使系统应用程序提供信息和/或功能,否则默认输出切换器不可用,因为媒体源自远程设备。 需要Manifest.permission.MEDIA_CONTENT_CONTROL
Android 参考。android.app.Notification.MediaStyle.setRemotePlaybackInfo
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
SetRemotePlaybackInfo(String, Int32, PendingIntent)
对于与远程设备上播放关联的媒体通知,请提供设备信息,以替换媒体控件上的输出切换器芯片的默认值,以及当点击输出切换器芯片时,在支持此功能的设备上使用的意向。
public Android.App.Notification.MediaStyle SetRemotePlaybackInfo(string deviceName, int iconResource, Android.App.PendingIntent? chipIntent);
member this.SetRemotePlaybackInfo : string * int * Android.App.PendingIntent -> Android.App.Notification.MediaStyle
参数
- deviceName
- String
CharSequence:要显示的远程设备的名称。 此值不能为 null。
- iconResource
- Int32
int:表示设备的图标资源
- chipIntent
- PendingIntent
PendingIntent:点击输出切换器时要发送的 PendingIntent。 可以为 null,在这种情况下,将禁用输出切换器。 此意向应打开活动,否则将被忽略。
返回
MediaStyle。 此值不能为 null。
注解
对于与远程设备上播放关联的媒体通知,请提供设备信息,以替换媒体控件上的输出切换器芯片的默认值,以及当点击输出切换器芯片时,在支持此功能的设备上使用的意向。 此方法旨在使系统应用程序提供信息和/或功能,否则默认输出切换器不可用,因为媒体源自远程设备。 需要Manifest.permission.MEDIA_CONTENT_CONTROL
Android 参考。android.app.Notification.MediaStyle.setRemotePlaybackInfo
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。