Stay organized with collections
Save and categorize content based on your preferences.
ConnectionCallback
class ConnectionCallback
Callbacks for connection related events.
Summary
Public methods |
open Unit |
Invoked after MediaBrowser.connect() when the request has successfully completed.
|
open Unit |
Invoked when the connection to the media browser failed.
|
open Unit |
Invoked when the client is disconnected from the media browser.
|
Public constructors
ConnectionCallback
ConnectionCallback()
Public methods
onConnectionFailed
open fun onConnectionFailed(): Unit
Invoked when the connection to the media browser failed.
onConnectionSuspended
open fun onConnectionSuspended(): Unit
Invoked when the client is disconnected from the media browser.
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-02-10 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-02-10 UTC."],[],[],null,["# MediaBrowser.ConnectionCallback\n\nAdded in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nConnectionCallback\n==================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/browse/MediaBrowser.ConnectionCallback \"View this page in Java\") \n\n```\nclass ConnectionCallback\n```\n\n|---|-----------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.media.browse.MediaBrowser.ConnectionCallback](#) |\n\nCallbacks for connection related events.\n\nSummary\n-------\n\n| Public constructors ||\n|--------------------------------------------------------|---|\n| [ConnectionCallback](#ConnectionCallback())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onConnected](#onConnected())`()` Invoked after [MediaBrowser.connect()](/reference/kotlin/android/media/browse/MediaBrowser#connect()) when the request has successfully completed. |\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onConnectionFailed](#onConnectionFailed())`()` Invoked when the connection to the media browser failed. |\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onConnectionSuspended](#onConnectionSuspended())`()` Invoked when the client is disconnected from the media browser. |\n\nPublic constructors\n-------------------\n\n### ConnectionCallback\n\n```\nConnectionCallback()\n```\n\nPublic methods\n--------------\n\n### onConnected\n\nAdded in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onConnected(): Unit\n```\n\nInvoked after [MediaBrowser.connect()](/reference/kotlin/android/media/browse/MediaBrowser#connect()) when the request has successfully completed. \n\n### onConnectionFailed\n\nAdded in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onConnectionFailed(): Unit\n```\n\nInvoked when the connection to the media browser failed. \n\n### onConnectionSuspended\n\nAdded in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onConnectionSuspended(): Unit\n```\n\nInvoked when the client is disconnected from the media browser."]]