[ Web Proxy ]
URL:
Viewing: https://developer.android.com/reference/android/media/MediaRouter2.OnGetControllerHintsListener [Back]  [Original]

MediaRouter2.OnGetControllerHintsListener  |  API reference  |  Android Developers Skip to main content
Essentials Design & Plan Develop Google Play Blog
Search:
Android Studio
Android Developers [Android Developers]
Stay organized with collections Save and categorize content based on your preferences.
Added in API level 30

MediaRouter2.OnGetControllerHintsListener


public static interface MediaRouter2.OnGetControllerHintsListener

android.media.MediaRouter2.OnGetControllerHintsListener


A listener interface to send optional app-specific hints when creating a RoutingController.

Summary

Public methods

abstract Bundle onGetControllerHints(MediaRoute2Info route)

Called when the MediaRouter2 or the system is about to request a media route provider service to create a controller with the given route.

Public methods

onGetControllerHints

Added in API level 30
public abstract Bundle onGetControllerHints (MediaRoute2Info route)

Called when the MediaRouter2 or the system is about to request a media route provider service to create a controller with the given route. The Bundle returned here will be sent to media route provider service as a hint.

Since controller creation can be requested by the MediaRouter2 and the system, set the listener as soon as possible after acquiring MediaRouter2 instance. The method will be called on the same thread that calls transferTo(MediaRoute2Info) or the main thread if it is requested by the system.

Parameters
route MediaRoute2Info: the route to create a controller with.
This value cannot be null.

Returns
Bundle An optional bundle of app-specific arguments to send to the provider, or null if none. The contents of this bundle may affect the result of controller creation.

See also:

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-08-03 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-03 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page