OriginatingSession


@RequiresApi(value = 26) interface OriginatingSession : 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 functions

SessionRemoteConnection

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

Inherited functions

From class com.google.ambient.crossdevice.sessions.TransferrableSession
suspend Unit

Cancels the transfer.

ListenableFuture<Unit>

Java-compatible version of cancelTransfer.

Public functions

getStartupRemoteConnection

fun getStartupRemoteConnection(): SessionRemoteConnection

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

Returns
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.