ReceivingSession
@RequiresApi(value = 26) interface ReceivingSession extends 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 methods |
|
|---|---|
abstract @NonNull SessionId |
Called when the receiving device is initialized and ready to run the Session. |
abstract @NonNull ListenableFuture<@NonNull SessionId> |
Java-compatible version of |
Inherited methods |
||||||
|---|---|---|---|---|---|---|
|
||||||
Inherited fields |
||
|---|---|---|
|
||
Public methods
onComplete
abstract @NonNull SessionId onComplete()
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
abstract @NonNull ListenableFuture<@NonNull SessionId> onCompleteFuture()
Java-compatible version of onComplete.