kai-morich / SimpleUsbTerminal

Android terminal app for devices with a serial / UART interface connected with a USB-to-serial-converter
MIT License
528 stars 195 forks source link

detect Usb connection #58

Closed SaraEngizek closed 1 year ago

SaraEngizek commented 1 year ago

"How to automatically detect USB device connection in Android?

kai-morich commented 1 year ago

use USB_DEVICE_ATTACHED intent https://developer.android.com/guide/topics/connectivity/usb/host#manifest as also done in this app

SaraEngizek commented 1 year ago

Actually, what I want to ask is that I use a typc-usb cable to connect to the phone while using this application. When I unplug the module cable while the typc cable is on the phone, there is no re-detection until I unplug the typc cable and plug it back in. how can i solve this