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 fields |
|
---|---|
abstract @NonNull SessionId |
|
Public methods |
|
---|---|
abstract void |
Destroys the |
abstract @NonNull ListenableFuture<Void> |
Java-compatible version of |
abstract @NonNull SessionRemoteConnection |
Gets communication channel to send messages to the primary of the Sessions. |
Public fields
Public methods
destroySecondarySession
abstract void destroySecondarySession()
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
abstract @NonNull ListenableFuture<Void> destroySecondarySessionFuture()
Java-compatible version of destroySecondarySession
.
getDefaultRemoteConnection
abstract @NonNull SessionRemoteConnection getDefaultRemoteConnection()
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 |