UsbManager.getDeviceList() returns empty

前端 未结 4 768
南笙
南笙 2020-12-21 05:46

I want to use the UsbManager API by wrote following code:

In the Activity code:

        UsbManager manager = (UsbManager) getSystemServi         


        
4条回答
  •  失恋的感觉
    2020-12-21 06:09

    Probably you are trying to run through android emulator but.....according to Android specs for the emulator : http://developer.android.com/tools/devices/emulator.html#limitations

    The functional limitations of the emulator include:

    No support for USB connections
    

    So, only with real device you can test UsbManager

提交回复
热议问题