The second Android 11 Developer Preview is now available, test it out and share your feedback.

StatusCallback

abstract class StatusCallback
kotlin.Any
   ↳ androidx.mediarouter.media.RemotePlaybackClient.StatusCallback

A callback that will receive media status updates.

Summary

Public constructors

A callback that will receive media status updates.

Public methods

open Unit
onItemStatusChanged(data: Bundle!, sessionId: String!, sessionStatus: MediaSessionStatus!, itemId: String!, itemStatus: MediaItemStatus!)

Called when the status of a media item changes.

open Unit
onSessionChanged(sessionId: String!)

Called when the session of the remote playback client changes.

open Unit
onSessionStatusChanged(data: Bundle!, sessionId: String!, sessionStatus: MediaSessionStatus!)

Called when the status of a media session changes.

Public constructors

<init>

StatusCallback()

A callback that will receive media status updates.

Public methods

onItemStatusChanged

open fun onItemStatusChanged(
    data: Bundle!,
    sessionId: String!,
    sessionStatus: MediaSessionStatus!,
    itemId: String!,
    itemStatus: MediaItemStatus!
): Unit

Called when the status of a media item changes.

Parameters
data Bundle!: The result data bundle.
sessionId String!: The session id.
sessionStatus MediaSessionStatus!: The session status, or null if unknown.
itemId String!: The item id.
itemStatus MediaItemStatus!: The item status.

onSessionChanged

open fun onSessionChanged(sessionId: String!): Unit

Called when the session of the remote playback client changes.

Parameters
sessionId String!: The new session id.

onSessionStatusChanged

open fun onSessionStatusChanged(
    data: Bundle!,
    sessionId: String!,
    sessionStatus: MediaSessionStatus!
): Unit

Called when the status of a media session changes.

Parameters
data Bundle!: The result data bundle.
sessionId String!: The session id.
sessionStatus MediaSessionStatus!: The session status, or null if unknown.