1、在安卓下获取usb设备的列表,案肤过程还是册激戴比较简单。诸缝这里就是依据以下代码,看在qt下如何实现这个流程

1、(1)Context.USB_SERVICE
USB_SERVICE是android.content.Context中的静态成员变量,可以通过getStaticObjectField来获取


2、(2)getSystemService函数
getSystemService 是android.app.Activity类的成员函数,其输入参数为Context.USB_SERVICE,返回的是android.hardware.usb.UsbManager的对象


3、(3)getDeviceList
getDeviceList是android.hardware.usb.UsbManager类的成员函数,获取一个java.util.HashMap类的变量


4、(4)遍历HashMap
遍历列表中的usb设备
