chirpsdk / io.chirp.chirpsdk / ChirpSDK / onReceived

onReceived

fun onReceived(onReceivedCallback: (payload: ByteArray?, channel: Int) -> Unit): Unit

Set onReceived Unit callback. Will be triggered when data is received.

Parameters

onReceivedCallback - Unit callback with payload and channel arguments. Payload will be null if data decoding will failed.