4GitHub - Magnusja - Libaums - Open Source Library To Access USB Mass Storage Devices On Android Without Rooting Your Device
4GitHub - Magnusja - Libaums - Open Source Library To Access USB Mass Storage Devices On Android Without Rooting Your Device
If you get the following error fairly often (mostly under Android 9.0 Pie):
or something similar, you might want to try the libusb module. This uses, instead of the Android USB host API, the libusb library for low
level communication with the USB mass storage device.
Note, that libusb is licensed under LGPL, which is different from the license this project is licensed under! This might come with some
drawbacks or extra work for closed source applications, see here: https://xebia.com/blog/the-lgpl-on-android/
HTTP server
javadoc 0.6.2
1. NanoHTTPD
2. AsyncHttpServer
You can spin up a server pretty easy, you just have to decide for a HTTP server implementation. If you do not have special
requirements, you can just go for one, it should not make much of a difference.
Java
Kotlin
If you want to be able to access these files when your app is in background, you should implement a service for that. There is an
example available in the httpserver module. You can use it, but should subclass it or create your own to adapt it to your needs.
Java