MediaRouteDiscoveryFragment

public class MediaRouteDiscoveryFragment
extends Fragment

java.lang.Object
   ↳ androidx.fragment.app.Fragment
     ↳ androidx.mediarouter.app.MediaRouteDiscoveryFragment


Media route discovery fragment.

This fragment takes care of registering a callback with proper flags for media route discovery:

The application must supply a route selector to specify the kinds of routes to discover. The application may also override onCreateCallback() to provide the MediaRouter callback to register.

Note that the discovery callback makes the application be connected with all the media route provider services while it is registered.

Summary

Public constructors

MediaRouteDiscoveryFragment()

Public methods

MediaRouter getMediaRouter()

Gets the media router instance.

MediaRouteSelector getRouteSelector()

Gets the media route selector for filtering the routes to be discovered.

void onCreate(Bundle savedInstanceState)

Called to do initial creation of a fragment.

MediaRouter.Callback onCreateCallback()

Called to create the callback that will be registered.

void onDestroy()

Called when the fragment is no longer in use.

int onPrepareCallbackFlags()

Called to prepare the callback flags that will be used when the callback is registered.

void onStart()

Called when the Fragment is visible to the user.

void onStop()

Called when the Fragment is no longer started.

void setRouteSelector(MediaRouteSelector selector)

Sets the media route selector for filtering the routes to be discovered.

Inherited methods