How to launch a receiver app in Chrome once Chromecast device has been whitelisted?

前端 未结 2 1998
迷失自我
迷失自我 2020-12-30 12:51

I am trying to launch my custom receiver application from the Chrome browser. The first step in doing so appears to add a receiver listener for the activity type I\'m intere

2条回答
  •  爱一瞬间的悲伤
    2020-12-30 13:02

    Yes activityType is your AppID. This works for me.

    It seems that the extension-injected code may scan the network for possible devices AND what Apps/"Activities" are available. When you whitelisted your device by serial number, Google associated that with an AppID as being allowed to be a "receiver" for it.

    For example, the string "YouTube" works of course, and both of my devices were sent into the onReceiverList callback. If I changed activityType to my AppID, then only my developer whitelisted device would show up. If I changed activityType to a random string, no devices show up.

提交回复
热议问题