I have a program on PC taking in string input from USB ( old program) I have a Android (4.X) tablet which needs to provide string input on USB to the program running on PC. When I used the sample code on Android, following code gives empty hashmap. The PC( tried on 32 bit XP and 64 bit Windows 7) has Android driver.
mManager = (UsbManager)getSystemService(Context.USB_SERVICE);
HashMap<String, UsbDevice> devices = mManager.getDeviceList();
Any real working code example talking to PC over USB will help, pl. also point out if any driver etc. needed on Android to talk to PC.
I have tried both the Accessory mode and the host mode( just in case)