[ Web Proxy ]
URL:
Viewing: https://developers.google.com/android/reference/com/google/android/gms/cast/CastRemoteDisplayClient [Back]  [Original]

CastRemoteDisplayClient  |  Google Play services  |  Google for Developers Skip to main content

CastRemoteDisplayClient Stay organized with collections Save and categorize content based on your preferences.

outlined_flag
public class CastRemoteDisplayClient extends GoogleApi<Api.ApiOptions.NoOptions>

This class 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. CastRemoteDisplayClient is available for the use cases where the Cast Remote Display rendering has to happen in a foreground service that runs in a separate process.

Public Method Summary

Task<Display>
startRemoteDisplay(CastDevice castDevice, String applicationId, int configPreset, PendingIntent sessionEndedPendingIntent)
The low level API for starting a Cast Remote Display session.
Task<Void>
stopRemoteDisplay()
The low level API for stopping a Cast Remote Display session.

Inherited Method Summary

Public Methods

public Task<Display> startRemoteDisplay (CastDevice castDevice, String applicationId, int configPreset, PendingIntent sessionEndedPendingIntent)

The low level API for starting a Cast Remote Display session. Calling this method will terminate any Cast Remote Display session previously started on this Android device.

Parameters
castDevice The CastDevice to start Cast Remote Display. Must not be null.
applicationId The ID of Cast Remote Display application (from the Cast developer portal). Must not be null.
configPreset The desired streaming preset, which is one of CastRemoteDisplay.Configuration
sessionEndedPendingIntent An optional PendingIntent. If provided, it will be fired when the Cast Remote Display session started by this call is ended. Caller can register a BroadcastReceiver to receive it. In the received Intent, an int extra keyed by CastRemoteDisplay.EXTRA_INT_SESSION_ENDED_STATUS_CODE contains the CastStatusCodes indicating the reason that caused the remote display session to end.
Returns
  • A Task 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.

public Task<Void> stopRemoteDisplay ()

The low level API for stopping a Cast Remote Display session.

Returns
  • A Task 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."],[],["`CastRemoteDisplayClient` is a deprecated class for managing Cast Remote Display sessions. It offers low-level APIs for starting and stopping sessions. `startRemoteDisplay` initiates a session, taking a `CastDevice`, application ID, configuration preset, and an optional `PendingIntent` for session end notifications. `stopRemoteDisplay` halts an ongoing session. This class is intended for scenarios where remote display rendering occurs in a separate foreground service. `CastRemoteDisplayLocalService` is suggested for most other cases.\n"]]

Web Proxy Viewer  |  New URL  |  Original Page