AndroidSerialPorts
Android-side USB serial discovery and transport construction.
jSerialComm 2.11.x on Android relies on JSerialPort.setAndroidContext being called once with an Application (or other long-lived) Context so the library can resolve the system UsbManager and request opens against permissioned UsbDevices. The caller is responsible for the standard UsbManager.requestPermission(device, pendingIntent) flow before the device shows up in list and can be opened.
Required AndroidManifest.xml entries for the host app:
<uses-feature android:name="android.hardware.usb.host" />
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>Functions
Enumerate USB serial ports the host app currently has permission for.
Open the named serial port. The port name is the SerialPortInfo.name value returned by list; under the hood jSerialComm derives this from the underlying USB device.
Convenience pass-through for enumerating raw UsbDevices the system exposes (regardless of permission state). Useful for building a permission-prompt picker UI.