来自同一发送者应用(Chromecast Android应用)的样式接收器和远程显示? [英] Styled Receiver and Remote Display from the same sender app (Chromecast Android app)?

查看:69
本文介绍了来自同一发送者应用(Chromecast Android应用)的样式接收器和远程显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个 Chromecast Android发送器应用程序,该应用程序需要具有两个接收器应用程序,其中一个类型为 Default / Styled Receiver App ,另一种类型为 Remote Display

I am building a Chromecast Android sender app that needs to have two receiver apps, one of type Default / Styled Receiver App and the other as Remote Display.

我正在我的 AndroidManifest中为我的应用设置 CastOptionsProvider .xml 为:

I am setting the CastOptionsProvider for my app in my AndroidManifest.xml as :

<meta-data
        android:name="com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME"
        android:value="com.myapp.CastOptionsProvider" />

CastOptionsProvider.xml

class CastOptionsProvider : OptionsProvider {

override fun getCastOptions(context: Context): CastOptions {
  // ... Other details
    return CastOptions.Builder()
            .setReceiverApplicationId(context.getString(R.string.remote_app_id))
            .setCastMediaOptions(mediaOptions)
            .build()
  }   
//...other implementations
}

由于此类未实例化我,但仅凭SDK本身,如何在此处放置两个接收器应用程序的接收器ID?

Since this class is not instantiated by me but by the SDK itself, how can I put receiver IDs for both the receiver apps here ?

R.string.remote_app_id 是我需要为两个应用程序放置接收者ID的地方。

R.string.remote_app_id is the place where I need to put receiver ids for both the apps.

即使我创建了两个选项提供程序类,每种类型一个,也可能将两个类都作为元数据放在 AndroidManifest.xml

Even if I create two options provider classes, one for each type, is it possible to put both the classes as meta-data in AndroidManifest.xml

推荐答案

我在Github上的 Castvideo-android ,并从莱昂·尼科尔斯

I posted the same question on Github at Castvideo-android and got the following reply from Leon Nicholls


Cast SDK仅支持一个接收者ID。
另外,我们强烈建议您不要使用远程显示API,因为它已被弃用。

Only one receiver ID is supported by the Cast SDK. Also, we highly recommend that you don't use the Remote Display API anymore since it is deprecated.

结论,到目前为止不支持

这篇关于来自同一发送者应用(Chromecast Android应用)的样式接收器和远程显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆