ReceivingSession
@RequiresApi(value = 26) interface ReceivingSession : TransferrableSession
Describes a Session that is in the process of being transferred to another device. The receiver of the Session will use this class to initialize the application.
Summary
Public functions |
|
---|---|
suspend SessionId |
Called when the receiving device is initialized and ready to run the Session. |
ListenableFuture<SessionId> |
Java-compatible version of |
Inherited functions |
||||||
---|---|---|---|---|---|---|
|
Inherited properties |
||
---|---|---|
|
Public functions
onComplete
suspend fun onComplete(): SessionId
Called when the receiving device is initialized and ready to run the Session. After this call, all methods will throw SessionException
with HANDLE_INVALIDATED
.
Throws | |
---|---|
com.google.ambient.crossdevice.sessions.SessionException: com.google.ambient.crossdevice.sessions.SessionException |
if the transfer cannot be completed for any reason:
|
onCompleteFuture
fun onCompleteFuture(): ListenableFuture<SessionId>
Java-compatible version of onComplete
.