MediaRouter


public class MediaRouter
extends Object

java.lang.Object
   ↳ android.media.MediaRouter


This API is not recommended for new applications. Use the AndroidX Media Router Library for consistent behavior across all devices.

MediaRouter allows applications to control the routing of media channels and streams from the current device to external speakers and destination devices.

A MediaRouter is retrieved through Context.getSystemService() of a Context.MEDIA_ROUTER_SERVICE.

This API is not thread-safe; all interactions with it must be done from the main thread of the process.

Summary

Nested classes

class MediaRouter.Callback

Interface for receiving events about media routing changes. 

class MediaRouter.RouteCategory

Definition of a category of routes. 

class MediaRouter.RouteGroup

Information about a route that