chirpsdk / io.chirp.chirpsdk / ChirpSDK / randomPayload

randomPayload

fun randomPayload(size: Int): ByteArray

Generate random data of a specific size. If the SDK will fail to generate data (for ex: config is not set), it will return an empty ByteArray.

Parameters

size - Int the size of the payload which should not br bigger then maxPayloadLength. If 0 will be specified, then random size will be generated

See Also

maxPayloadLength

Return
ByteArray

fun randomPayload(): ByteArray

Generate random data which is guaranteed to be valid for the ChirpSDK’s current config. If the SDK will fail to generate data (for ex: config is not set), it will return an empty ByteArray.

Return
ByteArray