android - 用于 Android 操作系统索尼电视上 DIAL 的应用程序名称

标签 android sony television

尝试在 Sony Bravia TV (Android) 上进行 DIAL 发现和启动。注意:不是尝试执行 Google Cast...而是尝试使用 DIAL 来发现并启动已安装的应用程序。 UDP 发现 SEARCH 给了我这个。

HTTP/1.1 200 OK
CACHE-CONTROL: max-age=1800
DATE: Mon, 15 Aug 2016 19:09:52 GMT
EXT:
LOCATION: http: // 10.180.12.183:8008 /ssdp/device-desc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: 4185dfde-1dd2-11b2-845e-c7225b044ee1
SERVER: Linux/3.10.27, UPnP/1.0, Portable SDK for UPnP devices/1.6.18
X-User-Agent: redsonic
ST: urn:dial-multiscreen-org:service:dial:1
USN: uuid:25664941-9d79-be82-aab6-39c4cdda7052::urn:dial-multiscreen-org:service:dial:1
BOOTID.UPNP.ORG: 0
CONFIGID.UPNP.ORG: 1869286273

检索 LOCATION http://10.180.12.183:8008/ssdp/device-desc.xml 会给出以下 header :

Application-Url: http: // 10.180.12.183:8008 /apps/
Content-Length: 1081
Content-Type: application/xml

该回复的内容是这样的:

<?xml version="1.0"?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
  <specVersion>
    <major>1</major>
    <minor>0</minor>
  </specVersion>
  <URLBase>http: // 10.180.12.183:8008 </URLBase>
  <device>
    <deviceType>urn:dial-multiscreen-org:device:dial:1</deviceType>
    <friendlyName>MySonyTv</friendlyName>
    <manufacturer>Sony</manufacturer>
    <modelName>BRAVIA 4K 2015</modelName>
    <UDN>uuid:25664941-9d79-be82-aab6-39c4cdda7052</UDN>
    <iconList>
      <icon>
        <mimetype>image/png</mimetype>
        <width>98</width>
        <height>55</height>
        <depth>32</depth>
        <url>/setup/icon.png</url>
      </icon>
    </iconList>
    <serviceList>
      <service>
        <serviceType>urn:dial-multiscreen-org:service:dial:1</serviceType>
        <serviceId>urn:dial-multiscreen-org:serviceId:dial</serviceId>
        <controlURL>/ssdp/notfound</controlURL>
        <eventSubURL>/ssdp/notfound</eventSubURL>
        <SCPDURL>http: // www .google.com/ cast</SCPDURL>
      </service>
    </serviceList>
  </device>
</root>

根据 DIAL REST 服务的 DIAL 协议(protocol)规则,我应该使用以下方法获取有关我的应用程序的信息:

http: // 10.180.12.183:8008 /apps/MyAppName

但我收到“404:未找到”和空文本响应。如果我使用“YouTube”或“Netflix”作为后缀而不是 MyAppName,我会得到有意义的 XML 响应。

一旦我得到对标准 DIAL REST GET 查询的良好响应,我希望对同一 URL 执行 DIAL REST POST 来启动我的应用程序 - 就像我能够对其他设备执行的操作一样支持拨号。

我的问题(希望针对熟悉索尼 Android 电视上的 DIAL 的索尼员工或索尼开发专家。我不需要有关客户端发现/启动的通用 DIAL 教程,并且知道如何编写 DIAL 服务器(如果需要的话)我决定这样做):

  1. 基于 Android 的索尼电视实际上支持 DIAL(不仅仅是 Google Cast V2 或 V3)吗?如果是这样,电视上 Android 应用程序中的哪个属性代表我应该在 DIAL REST 后缀中使用的应用程序名称?

  2. 我的电视应用程序的 AndroidManifest.xml 中是否需要一些额外的条目,或者可能还需要额外的资源(类似于 Amazon Fire TV 需要 xml/whisperplay.xml 资源,其中包含 xml 条目“dial/application/” dialid”,Fire DIAL 服务器使用它来发现/启动)?

  3. 关于基于索尼 Android 的电视实现 DIAL 服务器的独特之处,您还有什么可以告诉我的吗?

注意:请记住...对 Google Cast 不感兴趣 - 我需要启动一个应用程序,而不仅仅是转换标准视频。另外,很高兴使用索尼可能提供的专有发现/启动机制...但是我需要知道该机制是如何工作的,所以如果这是解决方案,我将不胜感激。

最佳答案

我有一辆 2015 年 Bravia,以下是我的网址格式:

http://192.168.1.100/DIAL/apps/com.sony.dtv.com.alexvas.dvr.pro.com.alexvas.dvr.activity.TvMainActivity

我不知道为什么需要 com.sony.dtv,但 url 的其余部分由应用程序 ID(在本例中为 com.alexvas.dvr.pro)以及您在应用程序中进行的 Activity 组成想要启动(com.alexvas.dvr.activity.TvMainActivity)

在端口 80 上发布到该 URL 会启动我的应用程序。

关于android - 用于 Android 操作系统索尼电视上 DIAL 的应用程序名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38982180/

相关文章:

android - Android 中的 "Surface"类到底是什么?

android - 安卓开启全景时如何设置光球模式

android - Spinner 无法加载整数数组?

java - Sony Bravia TV 默认商店的 PackangeManager.getInstallerPackageName 的返回值是多少

javascript - 如何调试 LG Webos Chromium 浏览器? (模拟器)

flutter - 我们可以为三星电视构建 Flutter 应用程序吗?

java - 原生 Android 前台定位服务崩溃 Flutter 应用

android - 带有 RecyclerView 的 AlertDialog

android - 获取 SmartWatch 1 和 2 的显示尺寸或区分两者

debugging - 使用索尼爱立信 Cedar (J108i) 进行设备上调试