StudioSoundSessionCallback

public interface StudioSoundSessionCallback


Callback interface for monitoring StudioSoundSession lifecycle events and abnormal disconnects.

Callbacks are invoked on the java.util.concurrent.Executor passed to createSession. If the session was created with createSession, they are invoked directly on a Binder thread, so they must not block. If release cannot reach the service, onSessionDestroyed is instead invoked on the thread that calls release().

Summary

Public methods

default void

Called when the session has been permanently destroyed and all associated resources have been torn down, including after release.

abstract void
onSessionDisconnected(int statusCode)

Called when a session encounters an unexpected disconnection or fatal service failure.

Public methods

onSessionDestroyed

default void onSessionDestroyed()

Called when the session has been permanently destroyed and all associated resources have been torn down, including after release.

onSessionDisconnected

abstract void onSessionDisconnected(int statusCode)

Called when a session encounters an unexpected disconnection or fatal service failure.

Parameters
int statusCode

the StudioSoundStatusCodes.StatusCode identifying the failure cause (such as BINDER_DIED or SERVICE_RELEASED)