Search in sources :

Example 1 with CustomMediaRouteDialogFactory

use of com.example.mediarouter.mediaroutedialog.CustomMediaRouteDialogFactory in project MediaRouter-Cast-Button-android by googlecast.

the class MediaRouterCustomDialogActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.media_router_action_bar_button);
    mCustomMediaRouteDialogFactory = new CustomMediaRouteDialogFactory();
    mMediaRouter = MediaRouter.getInstance(getApplicationContext());
    // Create a MediaRouteSelector for the type of routes your app supports
    mMediaRouteSelector = new MediaRouteSelector.Builder().addControlCategory(CastMediaControlIntent.categoryForCast(getResources().getString(R.string.app_id))).build();
    // Create a MediaRouter callback for discovery events
    mMediaRouterCallback = new MyMediaRouterCallback();
}
Also used : MediaRouteSelector(android.support.v7.media.MediaRouteSelector) CustomMediaRouteDialogFactory(com.example.mediarouter.mediaroutedialog.CustomMediaRouteDialogFactory)

Aggregations

MediaRouteSelector (android.support.v7.media.MediaRouteSelector)1 CustomMediaRouteDialogFactory (com.example.mediarouter.mediaroutedialog.CustomMediaRouteDialogFactory)1