MediaRouteDiscoveryFragment
open class MediaRouteDiscoveryFragment : Fragment
kotlin.Any | ||
↳ | 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:
- In
Fragment#onCreate
phase, the callback is registered with zero flags. - In
Fragment#onStart
phase, the callback's flags are set to the value which is provided byonPrepareCallbackFlags()
. - In
Fragment#onStop()
phase, the callback's flags are set to zero.
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 | |
---|---|
<init>() |
Public methods | |
---|---|
open MediaRouter! |
Gets the media router instance. |
open MediaRouteSelector! |
Gets the media route selector for filtering the routes to be discovered. |
open Unit | |
open MediaRouter.Callback! |
Called to create the |
open Unit | |
open Int |
Called to prepare the callback flags that will be used when the |
open Unit |
onStart() |
open Unit |
onStop() |
open Unit |
setRouteSelector(selector: MediaRouteSelector!) Sets the media route selector for filtering the routes to be discovered. |
Inherited functions | |
---|---|