我編寫了一個接受M-SEARCH廣播消息並用HTTP/1.1 200消息響應的java chromecast接收器應用程序。一旦發送響應,Android應用程序也會調用device-desc.xml文件。但android應用程序不顯示接收器名稱。但是Fling應用程序(https://github.com/entertailion/Fling)能夠在沒有任何問題的情況下發現接收器。Chromecast android應用程序未發現自定義接收器
任何幫助將不勝感激。從Chromecast的Android應用
請求
M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
MAN: "ssdp:discover"
MX: 1
ST: urn:dial-multiscreen-org:service:dial:1
從JAVA應用程序接收器響應
HTTP/1.1 200 OK
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
EXT:
LOCATION: http://10.0.0.4:8008/ssdp/device-desc.xml
ST: urn:dial-multiscreen-org:service:dial:1
USN: uuid:{UUID}
BOOTID.UPNP.ORG: 7339
CONFIGID.UPNP.ORG: 7339
設備desc.xml託管在8008
<root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:r="urn:restful-tv-org:schemas:upnp-dd">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<URLBase>http://10.0.0.4:8008</URLBase>
<device>
<deviceType>urn:schemas-upnp-org:device:dail:1</deviceType>
<friendlyName>Lava2</friendlyName>
<manufacturer>Google Inc.</manufacturer>
<modelName>Eureka Dongle</modelName>
<UDN>uuid:{UUID}</UDN>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:dail:1</serviceType>
<serviceId>urn:upnp-org:serviceId:dail</serviceId>
<controlURL>/ssdp/notfound</controlURL>
<eventSubURL>/ssdp/notfound</eventSubURL>
<SCPDURL>/ssdp/notfound</SCPDURL>
</service>
</serviceList>
</device>
</root>