SecondarySession
@RequiresApi(value = 26) interface SecondarySession
When a Session becomes shared with one or more devices, this interface represents a secondary device (a device that has joined an existing Session).
Summary
| Public functions | |
|---|---|
| suspend Unit | Destroys the  | 
| ListenableFuture<Void?> | Java-compatible version of  | 
| SessionRemoteConnection | Gets communication channel to send messages to the primary of the Sessions. | 
| Public properties | |
|---|---|
| SessionId | 
 | 
Public functions
destroySecondarySession
suspend fun destroySecondarySession(): Unit
Destroys the SecondarySession.
When a SecondarySession is destroyed, the connection with the Primary is terminated and this participant will leave the underlying Session.
| Throws | |
|---|---|
| com.google.ambient.crossdevice.sessions.SessionException: com.google.ambient.crossdevice.sessions.SessionException | if the  | 
destroySecondarySessionFuture
fun destroySecondarySessionFuture(): ListenableFuture<Void?>
Java-compatible version of destroySecondarySession.
getDefaultRemoteConnection
fun getDefaultRemoteConnection(): SessionRemoteConnection
Gets communication channel to send messages to the primary of the Sessions.
| Throws | |
|---|---|
| com.google.ambient.crossdevice.sessions.SessionException: com.google.ambient.crossdevice.sessions.SessionException | if the  | 
