View files on a USB device in an Android tablet

I am developing a project for an Android tablet with a USB port. In this project, I need to browse the files available on the USB device when the USB device is connected to the tab.

Does anyone know about this, and is there any tutorial on this topic ?. There is some sample code there.

I am currently using Android 2.2. According to Android docs, he says that USB host mode is only supported on Android 3.1 and higher. I need to change my API level to Android 3.1.

Please, help...: (

+4
source share
1 answer

From the documentation provided on the Android Developer website, it seems that USB APIs are provided with Android 3.1 (API level 12) and beyond. Android 2.2 does not offer USB interfaces.

If you also have an Android 2.3.4 device, you can use the "Open Accessory Library", which is based on the USB (Universal Serial Bus) stack built into the platform and an API that works with applications. Check out the link below for more information: Open the accessories library for 2.3.4

+1
source

Source: https://habr.com/ru/post/1397369/


All Articles