I'm building an app that can cast to both Chromecast and AppleTV devices. Discovery of these devices is working: ChromeCasts are discovered using the MediaRouter
and AppleTVs are discovered using SSDP. At the moment, I have a regular button that displays an combined list of discovered devices, but I'd like to have it use the fancy cast button.
Is there an elegant way to extend the MediaRouteButton
to display my own list of discovered devices or should I just be creating my own button from scratch with the cast drawables?
I know that the MediaRouteButton
class can be extended, but I'm not sure how to apply my extended button to the button declared via xml. I feel like I'm missing something painfully obvious, but I haven't found it yet.