It can be used normally. When I swipe on the touch screen with my finger, the software does not handle touch screen events. Then it gives an error。I use usbSerialPort.write(data, 0); to read the value.I have a problem with my current Android device. I keep sliding my finger on the screen and the screen will not respond to touch events. Does this have something to do with it?
crash error:onRunError : java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.hardware.usb.UsbRequest.queue(java.nio.ByteBuffer, int)' on a null object reference
onRunError : java.io.IOException: Queueing USB request failed
I use :public void openDevice() { try{ lastOpenTime = System.currentTimeMillis(); // refresh(); UsbManager usbManager = (UsbManager) MyApplication.getInstance().getSystemService(Context.USB_SERVICE); List availableDrivers = UsbSerialProber.getDefaultProber().findAllDrivers(usbManager);
if (availableDrivers.isEmpty()) {
return;
}
It can be used normally. When I swipe on the touch screen with my finger, the software does not handle touch screen events. Then it gives an error。I use usbSerialPort.write(data, 0); to read the value.I have a problem with my current Android device. I keep sliding my finger on the screen and the screen will not respond to touch events. Does this have something to do with it?