OnPayloadReceivedCallback
interface OnPayloadReceivedCallback
com.google.android.gms.dtdi.core.OnPayloadReceivedCallback |
Listener that is notified when a payload received.
Summary
Public methods |
|
---|---|
abstract Unit |
onConnectionClosed(reason: String?) Called when the connection is closed. |
abstract Unit |
onPayloadReceived(channelName: String, token: IBinder, bytes: ByteArray) Called when receive raw bytes on a named channel from the remote device. |
Public methods
onConnectionClosed
abstract fun onConnectionClosed(reason: String?): Unit
Called when the connection is closed.
Parameters | |
---|---|
reason: String? | The reason provided by the remote participant |
onPayloadReceived
abstract fun onPayloadReceived(
channelName: String,
token: IBinder,
bytes: ByteArray
): Unit
Called when receive raw bytes on a named channel from the remote device.
Parameters | |
---|---|
channelName: String | Name of the channel from which the payload is received. |
token: IBinder | The token representing the device from which this payload is received. This is the same token in SelectedDevice. |
bytes: ByteArray | The message payload received. |