Android UsbDeviceConnection.requestWait () with timeout

I am trying to connect a USB tuner card to an Android device (version 19).

I am currently using UsbDeviceConnection.requestWait () to read data followed by UsbRequest.queue from 16kb. Everything works fine.

If there is no input for tuner, USB will not receive any data. In this case, requestWait () will block forever. I tried to use UsbRequest.close and UsbRequest.cancel but was not helpful.

I looked at the link " http://code.google.com/p/android/issues/detail?id=39522 ", it mentions the same issue but needs to write a new JNI.

My requirement is that I should be able to get out of the wait and would not want to try and write new JNI information (as above). Please suggest.

+3


source to share





All Articles