I am currently trying to make an application who realise the communication (receiving data) between an Android phone and a device.
The phone recognise the device, but I can not receive data from the device.
I'm using the package android.hardware.usb.
So, I found the device (deviceID, productID etc...), I found the interfaces and the endpoints, but I don't know how to send a request to the correct endpoint and receive data from the device. I identified all interfaces and endpoints and I saw which endpoint can send data from the device to the phone.
Does anyone know how you can receive data from a device by using UsbDeviceConnection ?
If I well understood, you have to create a new thread to carry all data transmissions, obtain UsbInterface and UsbEndpoint, send requests on endpoint with a UsbDeviceConnection and after all that you cand receive the data.
Thank you in advance.