TransferrableSession
@RequiresApi(value = 26) interface TransferrableSession
OriginatingSession | 
                
                   Describes a Session that is in the process of being transferred to another device.  | 
              
ReceivingSession | 
                
                   Describes a Session that is in the process of being transferred to another device.  | 
              
Describes methods that are common to both originating and receiving sides of a Session transfer.
Summary
Public fields | 
          |
|---|---|
abstract @NonNull SessionId | 
            
              
               
  | 
          
Public methods | 
          |
|---|---|
abstract void | 
            
              
               Cancels the transfer.  | 
          
abstract @NonNull ListenableFuture<Unit> | 
            
              
               Java-compatible version of   | 
          
abstract @NonNull SessionRemoteConnection | 
            
              
               Gets communication channel to send initialization messages back and forth between the originating and receiving device.  | 
          
Public fields
Public methods
cancelTransfer
abstract void cancelTransfer()
Cancels the transfer. 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 cancelled for any reason.  | 
            
cancelTransferFuture
abstract @NonNull ListenableFuture<Unit> cancelTransferFuture()
Java-compatible version of cancelTransfer.
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   | 
            
| Throws | |
|---|---|
com.google.ambient.crossdevice.sessions.SessionException com.google.ambient.crossdevice.sessions.SessionException | 
              
                 if this session has already completed.  |