belongs to Maven artifact com.android.support:mediarouter-v7:28.0.0-alpha1
RemotePlaybackClient
public
class
RemotePlaybackClient
extends Object
java.lang.Object | |
↳ | android.support.v7.media.RemotePlaybackClient |
A helper class for playing media on remote routes using the remote playback protocol
defined by MediaControlIntent
.
The client maintains session state and offers a simplified interface for issuing remote playback media control intents to a single route.
Summary
Nested classes | |
---|---|
class |
RemotePlaybackClient.ActionCallback
Base callback type for remote playback requests. |
class |
RemotePlaybackClient.ItemActionCallback
Callback for remote playback requests that operate on items. |
interface |
RemotePlaybackClient.OnMessageReceivedListener
A callback that will receive messages from media sessions. |
class |
RemotePlaybackClient.SessionActionCallback
Callback for remote playback requests that operate on sessions. |
class |
RemotePlaybackClient.StatusCallback
A callback that will receive media status updates. |
Public constructors | |
---|---|
RemotePlaybackClient(Context context, MediaRouter.RouteInfo route)
Creates a remote playback client for a route. |
Public methods | |
---|---|
void
|
endSession(Bundle extras, RemotePlaybackClient.SessionActionCallback callback)
Sends a request to end the media playback session. |
void
|
enqueue(Uri contentUri, String mimeType, Bundle metadata, long positionMillis, Bundle extras, RemotePlaybackClient.ItemActionCallback callback)
Sends a request to enqueue a media item. |
String
|
getSessionId()
Gets the current session id if there is one. |
void
|
getSessionStatus(Bundle extras, RemotePlaybackClient.SessionActionCallback callback)
Sends a request to get the status of the media playback session. |
void
|
getStatus(String itemId, Bundle extras, RemotePlaybackClient.ItemActionCallback callback)
Sends a request to get the status of a media item. |
boolean
|
hasSession()
Returns true if the client currently has a session. |
boolean
|
isMessagingSupported()
Returns true if the route supports messages. |
boolean
|
isQueuingSupported()
Returns true if the route supports queuing features. |
boolean
|
isRemotePlaybackSupported()
Returns true if the route supports remote playback. |
boolean
|
isSessionManagementSupported()
Returns true if the route supports session management features. |
void
|
|