Domanda

Is there a way to detect a Chromecast device on the same WLAN-network? I have an android app, that plays a video on its current activity or launches an seperate activity for casting on Chromecast.

All I need to do now ist implementing logic for "is there a chromecast device I could connect to?" and "am I connected to a chromecast device?" an start playback on the corresponding activity.

Starting the reciever app and everything thereafter is already implemented and working fine so far, it's just those little questions I am tripping over at the moment.

È stato utile?

Soluzione

Media Router scan will discover chromecast devices that are on the same network, so if it doesn't discover any device, there is none on your network. You can also hook into the media router callbacks to be notified immediately when a device is discovered (MediaRouter.Callback has a callback onRouteAdded()).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top