Java – can I programmatically detect whether there are any chromecast devices on the current WiFi network?

Whether you can detect whether there are any chromecast devices on the current WiFi network I've seen a cast SDK, but I can't find any information about the search device I have never used this SDK before. I may ignore it

Solution

You can perform discovery without using the projection button; You need to use the media router from the V7 support library (which also needs V7 appcompat support), then get the instance of the media router from your code, define a selector (which is basically a filter, which may narrow the scope of your device) and add a callback to start Discovery Your callback is invoked when a device (asynchronous) is discovered Take a look at the sample project, especially the class, which fully meets your requirements

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>