I am trying to send some data from one Android phone(Nexus 5), which is working as Usb Host, to Android tablet(Samsung Tab 4).
I am using bulkTransfer() method to transfer data from Nexus 5, which is returning the length of data that has been transferred successfully.
My question is How can I verify on the other end (at Samsung Tab), that yes I am getting the data that I had transferred from Nexus 5 ?
Here is some code snippet of transferring data
usbDeviceConnection = manager.openDevice(device);
boolean flag = usbDeviceConnection.claimInterface(usbInterface, true);
String text = textValue.getText().toString();
byteArray = text.getBytes();
// data transfer
int a = usbDeviceConnection.bulkTransfer(endpointOut, byteArray, byteArray.length, 0);
if(a>0){
textInfo.setText("Data has been transferred successfully..."
+"\n"+"Length of data: "+a
);
Please help me to do this task...!