Hello ladies & gents!
I have a problem. I have a qr code scanner, specifically QR MICROQR XT-7308. I want to fetch data it’s reading to lenovo mtab10 tablet. On the computer qr code scanner is working just fine i.e. after scanning qr it types its output to some sort of text field - notes, text files whatever it behaves like a keyboard. But when I try to fetch it within the code using the device manager it doesn’t show up. Qr code scanner and tablet are both connected to the same USB hub and hub is connected to power so both devices can run nonstop.
According to android documentation I’ve included these lines in manifest file:
<uses-feature android:name="android.hardware.usb.host" /> <uses-sdk android:minSdkVersion="12" /> <intent-filter> <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" /> </intent-filter> <intent-filter> <action android:name="android.hardware.usb.action.USB_DEVICE_DETACHED" /> </intent-filter>
When it comes to calling an USB Manager I do it like that
m_usbManager = getSystemService(Context.USB_SERVICE) as UsbManager Log.i("TAG", (m_usbManager.deviceList.size).toString())
I know that when USB hub is connected to PC it won’t read any devices because the laptop is the USB Host, but when they’re connected to USB hub without a computer in-circuit why doesn’t it see it?
Any help will be highly appreciated.