Getting different identifier on reconnect after connection loss.
can't get device by 'identifier' after reconnected.
val device = manager.deviceList[identifier]
be cause, getting different 'UsbDevice.identifier' on each re-connection,
so doesn't get print after reconnect,
Got this issue on android device (version 11)
Not sure what you mean. An example may help
@Sunbreak This issue exists, because the device is identified by its index, each time device connects and disconnects it will change the index/identifier.
To rectify this issue we have to take the device by vendor id and productid
This issue is because Device ID's are not persistent across USB disconnects. should add an option to get deviceId using vendorId and productId. Then only can connect across USB disconnects. Or connection method should change to VendorId or ProductId Based.
Thanks for your info. However I'm busy on work these days. Could PR on this?