How to create custom Cast dialog with Chromecast V3 sdk

Therefore, after reading most of the V3 documentation, it seems that it has MediaRouterbecome internal to the object CastContext, and we no longer have access to it. I am encountering problems when trying to create a custom dialog with the V3 framework. I currently have MediaRouteButtonin xml and I am setting it up using my activity as context through

CastButtonFactory.setUpMediaRouteButton(mActivity, mCastButton);

I also tried to include a Google sample 2 years ago in the framework of V3, but of course it did not work. Here is the sample that I pulled from

https://github.com/googlecast/MediaRouter-Cast-Button-android/blob/master/src/com/example/mediarouter/MediaRouterCustomDialogActivity.java

Does anyone know a way to make Custom Cast Dialog out MediaRouteActionProvider?

+4
source share

Source: https://habr.com/ru/post/1663665/


All Articles