CastRemoteDisplayApi
Stay organized with collections
Save and categorize content based on your preferences.
This interface is deprecated.The Remote Display feature is deprecated and will be removed in a future release.
The low level API for starting a Cast Remote Display session (see CastRemoteDisplay
.
In most use cases CastRemoteDisplayLocalService
should be considered instead as it will simplify managing the Cast Remote Display session
when the main activity goes to background and will provide a customizable default
notification. CastRemoteDisplayApi
is available for the use cases where the Cast Remote Display rendering has to happen on a
foreground service that runs on a separate process.
Public Methods
The low level API for starting a Cast Remote Display session.
Parameters
The low level API for stopping a Cast Remote Display session.
Returns
- A
PendingResult
that will be successful if the remote display session could be stopped normally.}.
Must not be null
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eCastRemoteDisplayApi\u003c/code\u003e is deprecated and will be removed in a future release.\u003c/p\u003e\n"],["\u003cp\u003eIt provides a low-level API for starting and stopping Cast Remote Display sessions.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCastRemoteDisplayLocalService\u003c/code\u003e is recommended for most use cases as it simplifies session management.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCastRemoteDisplayApi\u003c/code\u003e is suitable for scenarios requiring remote display rendering on a foreground service in a separate process.\u003c/p\u003e\n"]]],[],null,["# CastRemoteDisplayApi\n\npublic interface **CastRemoteDisplayApi** \n**This interface is deprecated.** \n\nThe Remote Display feature is deprecated and will be removed in a future release.\n\nThe low level API for starting a Cast Remote Display session (see [CastRemoteDisplay](/android/reference/com/google/android/gms/cast/CastRemoteDisplay).\nIn most use cases [CastRemoteDisplayLocalService](/android/reference/com/google/android/gms/cast/CastRemoteDisplayLocalService)\nshould be considered instead as it will simplify managing the Cast Remote Display session\nwhen the main activity goes to background and will provide a customizable default\nnotification. [CastRemoteDisplayApi](/android/reference/com/google/android/gms/cast/CastRemoteDisplayApi)\nis available for the use cases where the Cast Remote Display rendering has to happen on a\nforeground service that runs on a separate process. \n\n### Public Method Summary\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[CastRemoteDisplay.CastRemoteDisplaySessionResult](/android/reference/com/google/android/gms/cast/CastRemoteDisplay.CastRemoteDisplaySessionResult)\\\u003e | [startRemoteDisplay](/android/reference/com/google/android/gms/cast/CastRemoteDisplayApi#startRemoteDisplay(com.google.android.gms.common.api.GoogleApiClient,%20java.lang.String))([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) apiClient, [String](//developer.android.com/reference/java/lang/String.html) applicationId) The low level API for starting a Cast Remote Display session. |\n| abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[CastRemoteDisplay.CastRemoteDisplaySessionResult](/android/reference/com/google/android/gms/cast/CastRemoteDisplay.CastRemoteDisplaySessionResult)\\\u003e | [stopRemoteDisplay](/android/reference/com/google/android/gms/cast/CastRemoteDisplayApi#stopRemoteDisplay(com.google.android.gms.common.api.GoogleApiClient))([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) apiClient) The low level API for stopping a Cast Remote Display session. |\n\nPublic Methods\n--------------\n\n#### public abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[CastRemoteDisplay.CastRemoteDisplaySessionResult](/android/reference/com/google/android/gms/cast/CastRemoteDisplay.CastRemoteDisplaySessionResult)\\\u003e\n**startRemoteDisplay** ([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) apiClient, [String](//developer.android.com/reference/java/lang/String.html) applicationId)\n\nThe low level API for starting a Cast Remote Display session. \n\n##### Parameters\n\n| apiClient | The google API client instance. See [GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient). Must not be `null`. |\n| applicationId | The ID of Cast Remote Display application (from the Cast developer portal). Must not be `null`. |\n|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- A [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult) that will be successful if the remote display session could be started normally, in this case it will contain the display that can be used with a [Presentation](//developer.android.com/reference/android/app/Presentation.html). See [CastRemoteDisplay.CastRemoteDisplaySessionResult](/android/reference/com/google/android/gms/cast/CastRemoteDisplay.CastRemoteDisplaySessionResult). \n\n#### public abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[CastRemoteDisplay.CastRemoteDisplaySessionResult](/android/reference/com/google/android/gms/cast/CastRemoteDisplay.CastRemoteDisplaySessionResult)\\\u003e\n**stopRemoteDisplay** ([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) apiClient)\n\nThe low level API for stopping a Cast Remote Display session. \n\n##### Parameters\n\n| apiClient | The google API client instance. See [GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient). See [CastRemoteDisplay.CastRemoteDisplaySessionResult](/android/reference/com/google/android/gms/cast/CastRemoteDisplay.CastRemoteDisplaySessionResult). |\n|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- A [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult) that will be successful if the remote display session could be stopped normally.}. Must not be `null`."]]