Callbacks for the Cast Remote Display session initiated using CastRemoteDisplayLocalService
.
Public Method Summary
abstract void |
onRemoteDisplaySessionEnded(CastRemoteDisplayLocalService
service)
Called when the Cast Remote Display session has been ended.
|
abstract void |
onRemoteDisplaySessionError(Status
status)
Called when the Cast Remote Display session could not be successfully created.
|
abstract void |
onRemoteDisplaySessionStarted(CastRemoteDisplayLocalService
service)
Called when the Cast Remote Display session has been successfully created.
|
abstract void |
onServiceCreated(CastRemoteDisplayLocalService
service)
Called when the local service has been created.
|
Public Methods
public abstract void onRemoteDisplaySessionEnded (CastRemoteDisplayLocalService service)
Called when the Cast Remote Display session has been ended. It will be called to provide session information and trigger detections when the session stops.
Parameters
service | This instance of the service. |
---|
public abstract void onRemoteDisplaySessionError (Status status)
Called when the Cast Remote Display session could not be successfully created.
Parameters
status | The reason why an error occurred establishing the Cast Remote Display session.
The possible set of error codes are
ERROR_SERVICE_CREATION_FAILED and
ERROR_SERVICE_DISCONNECTED . |
---|
public abstract void onRemoteDisplaySessionStarted (CastRemoteDisplayLocalService service)
Called when the Cast Remote Display session has been successfully created. It will
be called before the invoking
onCreatePresentation(Display)
. In this way, the service could be configured
(if needed) before the CastPresentation
is started.
Parameters
service | This instance of the service. |
---|
public abstract void onServiceCreated (CastRemoteDisplayLocalService service)
Called when the local service has been created. In most scenarios applications can simply ignore this callback. However, for optimization reasons, some applications may want to start some initialization in the context of the local service as soon as it is created, while the Cast Remote Display session is still starting. Another possible use case is updating the custom notification with a notification that uses the service context.
Parameters
service | This instance of the service. |
---|