SerialPortExample
SerialPortExample copied to clipboard
We need to take an array of
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case UsbService.MESSAGE_FROM_SERIAL_PORT:
String data = (String) msg.obj;
mActivity.get().display.append(data);
break;
}
}
I'm sending a request which consists of 3 or 8 bytes. In response, I have to get an array of the same 3 or 8 bytes. How do I do that? Send I got. byte[] cats = {0x00, 0x05, 0x3F}; usbService.write(cats); Here's how to accept and display, I do not know ... Can you help me? Sorry for my English.