0
votes

In my Android Sender Application, I would like to display the status of a newly discovered Chromecast device. For e.g if another app lets say Youtube is currently casting to this device, then I would like to put a status as "casting Youtube" next to the device name in my receiver list.

For this, once I discover a media route, I connect to that device. On getting a ConnectionCallbacks.onConnected() event, I try to retrieve the application metadata using Cast.CastApi.getApplicationMetadata(GoogleApiClient). But I'm getting a null value here. When I run my Sender App, I make sure that I'm casting to the same Chromecast receiver from another app like Youtube. So I expect the application metadata to reflect Youtube app details its like appId, name etc. Is there a different way to achieve this?

1

1 Answers

0
votes

YouTube is still using the old preview SDK so that might be a factor in seeing null. Please try an app that is using the new SDK and see if that returns more useful data. I know there was a bug which caused that method to return null all the time but I believe that was fixed with the recent play services update.