RemotePlaybackClient.StatusCallback


public abstract class RemotePlaybackClient.StatusCallback


A callback that will receive media status updates.

Summary

Public constructors

Public methods

void
onItemStatusChanged(
    @Nullable Bundle data,
    @NonNull String sessionId,
    @Nullable MediaSessionStatus sessionStatus,
    @NonNull String itemId,
    @NonNull MediaItemStatus itemStatus
)

Called when the status of a media item changes.

void

Called when the session of the remote playback client changes.

void
onSessionStatusChanged(
    @Nullable Bundle data,
    @NonNull String sessionId,
    @Nullable MediaSessionStatus sessionStatus
)

Called when the status of a media session changes.

Public constructors

StatusCallback

Added in 1.1.0
public StatusCallback()

Public methods

onItemStatusChanged

Added in 1.1.0
public void onItemStatusChanged(
    @Nullable Bundle data,
    @NonNull String sessionId,
    @Nullable MediaSessionStatus sessionStatus,
    @NonNull String itemId,
    @NonNull MediaItemStatus itemStatus
)

Called when the status of a media item changes.

Parameters
@Nullable Bundle data

The result data bundle.

@NonNull String sessionId

The session id.

@Nullable MediaSessionStatus sessionStatus

The session status, or null if unknown.

@NonNull String itemId

The item id.

@NonNull MediaItemStatus itemStatus

The item status.

onSessionChanged

Added in 1.1.0
public void onSessionChanged(@Nullable String sessionId)

Called when the session of the remote playback client changes.

Parameters
@Nullable String sessionId

The new session id.

onSessionStatusChanged

Added in 1.1.0
public void onSessionStatusChanged(
    @Nullable Bundle data,
    @NonNull String sessionId,
    @Nullable MediaSessionStatus sessionStatus
)

Called when the status of a media session changes.

Parameters
@Nullable Bundle data

The result data bundle.

@NonNull String sessionId

The session id.

@Nullable MediaSessionStatus sessionStatus

The session status, or null if unknown.