MediaBrowserCompat.ConnectionCallback


class MediaBrowserCompat.ConnectionCallback


Callbacks for connection related events.

Summary

Public constructors

Public functions

Unit

Invoked after connect when the request has successfully completed.

Unit

Invoked when the connection to the media browser service failed.

Unit

Invoked when a connection to the browser service has been lost.

Public constructors

ConnectionCallback

Added in 1.1.0
ConnectionCallback()

Public functions

onConnected

Added in 1.1.0
fun onConnected(): Unit

Invoked after connect when the request has successfully completed. This can also be called when the service is next running after it crashed or has been killed.

onConnectionFailed

Added in 1.1.0
fun onConnectionFailed(): Unit

Invoked when the connection to the media browser service failed. Connection failures can happen when the browser failed to bind to the service, or when it is rejected from the service.

onConnectionSuspended

Added in 1.1.0
fun onConnectionSuspended(): Unit

Invoked when a connection to the browser service has been lost. This typically happens when the process hosting the service has crashed or been killed. This does not remove the connection itself -- this binding to the service will remain active, and onConnected will be called when the service is next running.