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

Callback

abstract class Callback
kotlin.Any
   ↳ androidx.mediarouter.media.MediaRouter.Callback

Interface for receiving events about media routing changes. All methods of this interface will be called from the application's main thread.

A Callback will only receive events relevant to routes that the callback was registered for unless the MediaRouter#CALLBACK_FLAG_UNFILTERED_EVENTS flag was specified in MediaRouter#addCallback(MediaRouteSelector, Callback, int).

Summary

Public constructors

Interface for receiving events about media routing changes.

Public methods
open Unit

Called when a media route provider has been added.

open Unit

Called when a property of the indicated media route provider has changed.

open Unit

Called when a media route provider has been removed.

open Unit

Called when a media route has been added.

open Unit

Called when a property of the indicated media route has changed.

open Unit

Called when a media route's presentation display changes.

open Unit

Called when a media route has been removed.

open Unit

Called when the supplied media route becomes selected as the active route.

open Unit
onRouteSelected(@NonNull router: MediaRouter, @NonNull route: MediaRouter.RouteInfo, reason: Int)

Called when the supplied media route becomes selected as the active route.

open Unit
onRouteSelected(@NonNull router: MediaRouter, @NonNull selectedRoute: MediaRouter.RouteInfo, reason: Int, @NonNull requestedRoute: MediaRouter.RouteInfo)

Called when the supplied media route becomes selected as the active route, which may be different from the route requested by selectRoute(RouteInfo).

open Unit

Called when the supplied media route becomes unselected as the active route.

open Unit

Called when the supplied media route becomes unselected as the active route.

open Unit

Called when a media route's volume changes.

Public constructors

<init>

Callback()

Interface for receiving events about media routing changes. All methods of this interface will be called from the application's main thread.

A Callback will only receive events relevant to routes that the callback was registered for unless the MediaRouter#CALLBACK_FLAG_UNFILTERED_EVENTS flag was specified in MediaRouter#addCallback(MediaRouteSelector, Callback, int).

Public methods

onProviderAdded

open fun onProviderAdded(
    router: MediaRouter!,
    provider: MediaRouter.ProviderInfo!
): Unit

Called when a media route provider has been added.

Parameters
router MediaRouter!: The media router reporting the event.
provider MediaRouter.ProviderInfo!: The provider that has become available for use.

onProviderChanged

open fun onProviderChanged(
    router: MediaRouter!,
    provider: MediaRouter.ProviderInfo!
): Unit

Called when a property of the indicated media route provider has changed.

Parameters
router MediaRouter!: The media router reporting the event.
provider MediaRouter.ProviderInfo!: The provider that was changed.

onProviderRemoved

open fun onProviderRemoved(
    router: MediaRouter!,
    provider: MediaRouter.ProviderInfo!
): Unit

Called when a media route provider has been removed.

Parameters
router MediaRouter!: The media router reporting the event.
provider MediaRouter.ProviderInfo!: The provider that has been removed from availability.

onRouteAdded

open fun onRouteAdded(
    router: MediaRouter!,
    route: MediaRouter.RouteInfo!
): Unit

Called when a media route has been added.

Parameters
router MediaRouter!: The media router reporting the event.
route MediaRouter.RouteInfo!: The route that has become available for use.

onRouteChanged

open fun onRouteChanged(
    router: MediaRouter!,
    route: MediaRouter.RouteInfo!
): Unit

Called when a property of the indicated media route has changed.

Parameters
router MediaRouter!: The media router reporting the event.
route MediaRouter.RouteInfo!: The route that was changed.

onRoutePresentationDisplayChanged

open fun onRoutePresentationDisplayChanged(
    router: MediaRouter!,
    route: MediaRouter.RouteInfo!
): Unit

Called when a media route's presentation display changes.

This method is called whenever the route's presentation display becomes available, is removed or has changes to some of its properties (such as its size).

Parameters
router MediaRouter!: The media router reporting the event.
route MediaRouter.RouteInfo!: The route whose presentation display changed.

onRouteRemoved

open