OriginatingSession


@RequiresApi(value = 26) interface OriginatingSession extends TransferrableSession


Describes a Session that is in the process of being transferred to another device. The originating side of the Session transfer will use this class to initialize the application.

Summary

Public methods

abstract @NonNull SessionRemoteConnection

Gets communication channel to send initialization messages back and forth between the originating and receiving device.

Inherited methods

From class com.google.ambient.crossdevice.sessions.TransferrableSession
abstract void

Cancels the transfer.

abstract @NonNull ListenableFuture<Unit>

Java-compatible version of cancelTransfer.

Public methods

getStartupRemoteConnection

abstract @NonNull SessionRemoteConnection getStartupRemoteConnection()

Gets communication channel to send initialization messages back and forth between the originating and receiving device.

Returns
@NonNull SessionRemoteConnection

The SessionRemoteConnection relevant to the transfer.

Throws
com.google.ambient.crossdevice.sessions.SessionException com.google.ambient.crossdevice.sessions.SessionException

if this session has already completed. This method will also throw an exception if it is called prior to the Session being ready for initialization. Applications will notify that they are ready for initialization in OriginatingSessionStateCallback.onConnected.

com.google.ambient.crossdevice.sessions.SessionException com.google.ambient.crossdevice.sessions.SessionException

if this session has already completed.