Stay organized with collections
Save and categorize content based on your preferences.
public
static
interface
MediaRouter2.DeviceSuggestionsUpdatesCallback
android.media.MediaRouter2.DeviceSuggestionsUpdatesCallback
|
Callback for receiving events about device suggestions
Summary
Public methods
onSuggestionsCleared
public abstract void onSuggestionsCleared (String suggestingPackageName)
Called when suggestions are cleared.
Parameters |
suggestingPackageName |
String : the package that cleared their provided suggestions.
This value cannot be null . |
onSuggestionsRequested
public abstract void onSuggestionsRequested ()
Called when a router requests a suggestion from suggestion providers.
public abstract void onSuggestionsUpdated (String suggestingPackageName,
List<SuggestedDeviceInfo> suggestedDeviceInfo)
Called when suggestions are updated.
Parameters |
suggestingPackageName |
String : the package that provided the suggestions.
This value cannot be null . |
suggestedDeviceInfo |
List : the suggestions provided by the package.
This value cannot be null . |
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 2025-08-20 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 2025-08-20 UTC."],[],[],null,["# MediaRouter2.DeviceSuggestionsUpdatesCallback\n\n[**Added in Android Baklava**](/preview) \n\nMediaRouter2.DeviceSuggestionsUpdatesCallback\n=============================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/media/MediaRouter2.DeviceSuggestionsUpdatesCallback \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nMediaRouter2.DeviceSuggestionsUpdatesCallback\n`\n\n\n`\n\n\n`\n\n|-------------------------------------------------------------|\n| android.media.MediaRouter2.DeviceSuggestionsUpdatesCallback |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nCallback for receiving events about device suggestions\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onSuggestionsCleared](/reference/android/media/MediaRouter2.DeviceSuggestionsUpdatesCallback#onSuggestionsCleared(java.lang.String))`(`[String](/reference/java/lang/String)` suggestingPackageName) ` Called when suggestions are cleared. |\n| ` abstract void` | ` `[onSuggestionsRequested](/reference/android/media/MediaRouter2.DeviceSuggestionsUpdatesCallback#onSuggestionsRequested())`() ` Called when a router requests a suggestion from suggestion providers. |\n| ` abstract void` | ` `[onSuggestionsUpdated](/reference/android/media/MediaRouter2.DeviceSuggestionsUpdatesCallback#onSuggestionsUpdated(java.lang.String,%20java.util.List\u003candroid.media.SuggestedDeviceInfo\u003e))`(`[String](/reference/java/lang/String)` suggestingPackageName, `[List](/reference/java/util/List)`\u003c`[SuggestedDeviceInfo](/reference/android/media/SuggestedDeviceInfo)`\u003e suggestedDeviceInfo) ` Called when suggestions are updated. |\n\nPublic methods\n--------------\n\n### onSuggestionsCleared\n\n[**Added in Android Baklava**](/preview) \n\n```\npublic abstract void onSuggestionsCleared (String suggestingPackageName)\n```\n\nCalled when suggestions are cleared.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------------------------|----------------------------------------------------------------------------------------------------|\n| `suggestingPackageName` | `String`: the package that cleared their provided suggestions. This value cannot be `null`. \u003cbr /\u003e |\n\n### onSuggestionsRequested\n\n[**Added in Android Baklava**](/preview) \n\n```\npublic abstract void onSuggestionsRequested ()\n```\n\nCalled when a router requests a suggestion from suggestion providers.\n\n\u003cbr /\u003e\n\n### onSuggestionsUpdated\n\n[**Added in Android Baklava**](/preview) \n\n```\npublic abstract void onSuggestionsUpdated (String suggestingPackageName, \n List\u003cSuggestedDeviceInfo\u003e suggestedDeviceInfo)\n```\n\nCalled when suggestions are updated.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------------------------|------------------------------------------------------------------------------------------|\n| `suggestingPackageName` | `String`: the package that provided the suggestions. This value cannot be `null`. \u003cbr /\u003e |\n| `suggestedDeviceInfo` | `List`: the suggestions provided by the package. This value cannot be `null`. \u003cbr /\u003e |"]]