SerialConnectionListener

Callbacks indicating state changes in the USB serial connection.

Functions

Link copied to clipboard
open fun onConnected()

Called when a connection has been established.

Link copied to clipboard
open fun onDataReceived(bytes: ByteArray)

Called when serial data is received.

Link copied to clipboard
open fun onDisconnected(thrown: Exception?)

Called when the connection has been terminated.

Link copied to clipboard

Unable to initiate the connection due to missing permissions. This is a terminal state.