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

Avoid restart of app without asking user for usb permission? #48

Closed NikhilUsadadiya closed 1 year ago

NikhilUsadadiya commented 2 years ago

Hi @kai-morich I am getting references from your library code and I must say it is a pretty awesome lightweight app. I am stuck on one change and seeking help from your side. I want to avoid the restart of the app every time whenever a device is connected. At the start of the application, a dialog appears which contains that allows the USB terminal app to always open for this device with a checkbox. I want to avoid restarting of the app every time when the app is in the foreground already. Any help will be appreciable.

kai-morich commented 2 years ago

you can adjust in AndroidManifest.xml

NikhilUsadadiya commented 2 years ago

Got stuck on this.

kai-morich commented 2 years ago

if you remove the usb_device_filter from the manifest, the 'always open app with ...' dialog will not be shown, but when you really want to connect to the device you have to confirm the permission dialog. Android does not allow without