Answer the question
In order to leave comments, you need to log in
Working with external USB devices in an Android application?
Hello.
I would like to ask a couple of questions about working with devices connected via USB.
At the moment, there is no android device at hand. Is there any way to test it in the emulator? For example, connect a device to a computer, will the emulator see it?
Tried like this:
manager = (UsbManager) getSystemService(Context.USB_SERVICE);
HashMap<String, UsbDevice> deviceList = manager.getDeviceList();
Iterator<UsbDevice> deviceIterator = deviceList.values().iterator();
while(deviceIterator.hasNext()) {
device = deviceIterator.next();
Log.d(TAG, "### device: " + device.toString());
}
Answer the question
In order to leave comments, you need to log in
Try Android x86, which is under Wirth. machine (virtualbox, for example). There should be more transparent with device forwarding
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question