Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

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:

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

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
onCreate(@Nullable savedInstanceState: Bundle?)

open MediaRouter.Callback!

Called to create the callback that will be registered.

open Unit

open Int

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

open Unit

open Unit

open Unit

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

Inherited functions

Public constructors

<init>

MediaRouteDiscoveryFragment()

Public methods

getMediaRouter

open fun getMediaRouter(): MediaRouter!

Gets the media router instance.

getRouteSelector

open fun getRouteSelector(): MediaRouteSelector!

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

Return
MediaRouteSelector! The selector, never null.

onCreate

open fun onCreate(@Nullable savedInstanceState: Bundle?): Unit

onCreateCallback

open fun onCreateCallback(): MediaRouter.Callback!

Called to create the callback that will be registered.

The default callback does nothing. The application may override this method to supply its own callback.

Return
MediaRouter.Callback! The new callback, or null if no callback should be registered.

onDestroy

open fun onDestroy(): Unit

onPrepareCallbackFlags

open fun onPrepareCallbackFlags(): Int

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

The default implementation returns MediaRouter#CALLBACK_FLAG_REQUEST_DISCOVERY.

Return
Int The desired callback flags.

onStart

open fun onStart(): Unit

onStop

open fun onStop(): Unit

setRouteSelector

open fun setRouteSelector(selector: MediaRouteSelector!): Unit

Sets the media route selector for filtering the routes to be discovered. This method must be called before the fragment is added.

Parameters
selector MediaRouteSelector!: The selector to set.