3 ms·
Native android apps can talk to regular USB devices, if granted the necessary permissions. But it's exposed through a Java api (and Kotlin I suppose, these days
by Retr0id 6mo ago
Native android apps can talk to regular USB devices, if granted the necessary permissions. But it's exposed through a Java api (and Kotlin I suppose, these days), which is fine, but it means you need to write your client logic twice. If you target the web, you can do it once.
(Yes, you could try to bulid some common interface, libusb-style, but I think you'll have a bad time with minor behavioural differences, especially around permissions. libusb itself does ostensibly support Android but there are several caveats: https://github.com/libusb/libusb/wiki/Android#does-libusb-support-android https://github.com/libusb/libusb/wiki/Android#does-libusb-su... )
- Gander5739 6mo agoSo you can't just use fastboot in termux, with https://github.com/nohajc/termux-adb https://github.com/nohajc/termux-adb, then?
- Retr0id 6mo agoIt uses libusb, so yes, modulo aforementioned documented caveats (as well as the undocumented ones)