public class

MediaBrowserCompat.ConnectionCallback

extends java.lang.Object

 java.lang.Object

↳androidx.media3.session.legacy.MediaBrowserCompat.ConnectionCallback

Overview

Callbacks for connection related events.

Summary

Constructors
publicConnectionCallback()

Methods
public voidonConnected()

Invoked after MediaBrowserCompat.connect() when the request has successfully completed.

public voidonConnectionFailed()

Invoked when the connection to the media browser service failed.

public voidonConnectionSuspended()

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

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public ConnectionCallback()

Methods

public void onConnected()

Invoked after MediaBrowserCompat.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.

See also:

public void onConnectionSuspended()

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 MediaBrowserCompat.ConnectionCallback.onConnected() will be called when the service is next running.

See also:

public void onConnectionFailed()

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.