OnPayloadReceivedCallback

interfaceOnPayloadReceivedCallback
com.google.android.gms.dtdi.core.OnPayloadReceivedCallback

Listener that is notified when a payload received.

Summary

Public methods

abstractUnit

Called when the connection is closed.

abstractUnit
onPayloadReceived(channelName:String,token:IBinder,bytes:ByteArray)

Called when receive raw bytes on a named channel from the remote device.

Public methods

onConnectionClosed

abstractfunonConnectionClosed(reason:String?):Unit

Called when the connection is closed.

Parameters
reason:String? The reason provided by the remote participant

onPayloadReceived

abstractfunonPayloadReceived(
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 inSelectedDevice.
bytes:ByteArray The message payload received.