Added in API level 37
SerialPortListener
interface SerialPortListener
| android.hardware.serial.SerialPortListener |
Listener to monitor serial port connections and disconnections.
Summary
| Public methods | |
|---|---|
| abstract Unit |
onSerialPortConnected(port: SerialPort)Called when a supported serial port is connected. |
| abstract Unit |
Called when a supported serial port is disconnected. |
Public methods
onSerialPortConnected
Added in API level 37
abstract fun onSerialPortConnected(port: SerialPort): Unit
Called when a supported serial port is connected.
| Parameters | |
|---|---|
port |
SerialPort: This value cannot be null. |
onSerialPortDisconnected
Added in API level 37
abstract fun onSerialPortDisconnected(port: SerialPort): Unit
Called when a supported serial port is disconnected.
| Parameters | |
|---|---|
port |
SerialPort: This value cannot be null. |