# RemotePlaybackClient.StatusCallback

Artifact: [androidx.mediarouter:mediarouter](https://developer.android.com/jetpack/androidx/releases/mediarouter) [View Source](https://cs.android.com/search?q=file:androidx/mediarouter/media/RemotePlaybackClient.java+class:androidx.mediarouter.media.RemotePlaybackClient.StatusCallback) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/mediarouter#1.1.0)

*** ** * ** ***


```
public abstract class RemotePlaybackClient.StatusCallback
```

<br />

*** ** * ** ***

A callback that will receive media status updates.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/mediarouter/media/RemotePlaybackClient.StatusCallback#StatusCallback()()` |

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/mediarouter/media/RemotePlaybackClient.StatusCallback#onItemStatusChanged(android.os.Bundle,java.lang.String,androidx.mediarouter.media.MediaSessionStatus,java.lang.String,androidx.mediarouter.media.MediaItemStatus)( @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/os/Bundle.html data, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html sessionId, @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/mediarouter/media/MediaSessionStatus sessionStatus, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html itemId, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/mediarouter/media/MediaItemStatus itemStatus )` Called when the status of a media item changes. |
| `void` | `https://developer.android.com/reference/androidx/mediarouter/media/RemotePlaybackClient.StatusCallback#onSessionChanged(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html sessionId)` Called when the session of the remote playback client changes. |
| `void` | `https://developer.android.com/reference/androidx/mediarouter/media/RemotePlaybackClient.StatusCallback#onSessionStatusChanged(android.os.Bundle,java.lang.String,androidx.mediarouter.media.MediaSessionStatus)( @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/os/Bundle.html data, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html sessionId, @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/mediarouter/media/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](https://developer.android.com/jetpack/androidx/releases/mediarouter#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 |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/os/Bundle.html data` | The result data bundle. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html sessionId` | The session id. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/mediarouter/media/MediaSessionStatus sessionStatus` | The session status, or null if unknown. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html itemId` | The item id. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/mediarouter/media/MediaItemStatus itemStatus` | The item status. |

### onSessionChanged

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/mediarouter#1.1.0)

```
public void onSessionChanged(@Nullable String sessionId)
```

Called when the session of the remote playback client changes.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html sessionId` | The new session id. |

### onSessionStatusChanged

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/mediarouter#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 |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/os/Bundle.html data` | The result data bundle. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html sessionId` | The session id. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/mediarouter/media/MediaSessionStatus sessionStatus` | The session status, or null if unknown. |