java.lang.Object | |
↳ | com.google.android.gms.cast.CastMediaControlIntent |
Intent constants for use with the Cast MediaRouteProvider. This class also contains utility
methods for creating a control category for discovering Cast media routes that support a
specific app and/or set of namespaces, to be used with MediaRouteSelector. If you don't need to
specify any restrictions, simply use CATEGORY_CAST
or
CATEGORY_REMOTE_PLAYBACK
.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ACTION_SYNC_STATUS | A Cast extension action for requesting the current media status when the current item ID is not known to the client application. | |||||||||
String | CATEGORY_CAST | A control category for discovering Cast devices. | |||||||||
String | DEFAULT_MEDIA_RECEIVER_APPLICATION_ID | The application id for the Cast Default Media Receiver. | |||||||||
int | ERROR_CODE_REQUEST_FAILED | An error code indicating that a Cast request has failed. | |||||||||
int | ERROR_CODE_SESSION_START_FAILED | An error code indicating that the request could not be processed because the session could not be started. | |||||||||
int | ERROR_CODE_TEMPORARILY_DISCONNECTED | An error code indicating that the connection to the Cast device has been lost, but the system is actively trying to re-establish the connection. | |||||||||
String | EXTRA_CAST_APPLICATION_ID | The extra that contains the ID of the application to launch for an
ACTION_START_SESSION
request. |
|||||||||
String | EXTRA_CAST_RELAUNCH_APPLICATION | The extra that indicates whether the application should be relaunched if it is already running (the default behavior) or whether an attempt should be made to join the application first. | |||||||||
String | EXTRA_CAST_STOP_APPLICATION_WHEN_SESSION_ENDS | The extra that indicates that the receiver application should be stopped when the session ends. | |||||||||
String | EXTRA_CUSTOM_DATA | The extra that contains a compact JSON string of custom data to pass with a media request. | |||||||||
String | EXTRA_DEBUG_LOGGING_ENABLED | The extra that indicates whether debug logging should be enabled for the Cast session. | |||||||||
String | EXTRA_ERROR_CODE | An error bundle extra for the error code. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a custom control category for discovering Cast devices that support running the
specified app, independent of whether the app is running or not.
| |||||||||||
Returns a custom control category for discovering Cast devices meeting both
application ID and namespace restrictions.
| |||||||||||
Returns a custom control category for discovering Cast devices currently running an
application which supports the specified namespaces.
| |||||||||||
Returns a custom control category for discovering Cast devices which support the default
Android remote playback actions using the specified Cast player.
| |||||||||||
Returns a custom control category for discovering Cast devices which support the Default
Media Receiver.
|
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
A Cast extension action for requesting the current media status when the current item ID is not known to the client application.
The extra EXTRA_SESSION_ID
must be supplied in the request. The request will fail with an error if the current session
does not match this session ID, or if there is no current session.
The extra EXTRA_ITEM_STATUS_UPDATE_RECEIVER
may optionally be supplied in the request to attach an update receiver for the current media
item, if there is any.
If any media is currently loaded, the result intent will contain the extras
EXTRA_ITEM_ID
,
EXTRA_ITEM_STATUS
, and
EXTRA_ITEM_METADATA
.
Otherwise, the result intent will be empty.
A control category for discovering Cast devices. When used as-is, matches any Cast device,
independent of app or namespace support. For restricting Cast devices by app and/or
namespaces support, use categoryForRemotePlayback(String)
.
The application id for the Cast Default Media Receiver.
An error code indicating that a Cast request has failed.
An error code indicating that the request could not be processed because the session could not be started.
An error code indicating that the connection to the Cast device has been lost, but the system is actively trying to re-establish the connection.
The extra that contains the ID of the application to launch for an
ACTION_START_SESSION
request. The value is expected to be a String.
The extra that indicates whether the application should be relaunched if it is already
running (the default behavior) or whether an attempt should be made to join the application
first. May be included in an
ACTION_START_SESSION
request. The value is expected to be a boolean.
The extra that indicates that the receiver application should be stopped when the session
ends. May be included in an
ACTION_START_SESSION
request. The value is expected to be a boolean.
The extra that contains a compact JSON string of custom data to pass with a media request.
The extra that indicates whether debug logging should be enabled for the Cast session. The value is expected to be a boolean.
An error bundle extra for the error code. The value is an integer, and will be one of the
ERROR_CODE_*
constants declared in this class.
Returns a custom control category for discovering Cast devices that support running the specified app, independent of whether the app is running or not.
applicationId | The application ID of the receiver application. |
---|
IllegalArgumentException | If applicationId is null .
|
---|
Returns a custom control category for discovering Cast devices meeting both
application ID and namespace restrictions. See categoryForCast(Collection)
and
categoryForCast(String)
for more details.
IllegalArgumentException | If either of the parameters is null .
|
---|
Returns a custom control category for discovering Cast devices currently running an application which supports the specified namespaces. Apps supporting additional namespaces beyond those specified here are still considered supported.
IllegalArgumentException | If namespaces is null .
|
---|
Returns a custom control category for discovering Cast devices which support the default
Android remote playback actions using the specified Cast player. If the Default Media
Receiver is desired, use DEFAULT_MEDIA_RECEIVER_APPLICATION_ID
as the
applicationId
.
applicationId | The application ID of the receiver application. |
---|
IllegalArgumentException | If applicationId is null .
|
---|
Returns a custom control category for discovering Cast devices which support the Default Media Receiver.