shehankonecranes / sp-react-native-mqtt

MQTT Client native module for react-native
68 stars 55 forks source link

How to send message is byte array #15

Open nguyenvanquan7826 opened 3 years ago

nguyenvanquan7826 commented 3 years ago

Hi, I want to send message, which is a byte array. Please help me.

cscovino commented 3 years ago

The easiest way is using text-encoding library to encode the byte array const string = new TextDecoder(encoding).decode(uint8array);

The other way is modify this library to accept byte array as payload

EduardoArtioli commented 1 year ago

What about receiving byte array? Currently a null string is not received. Making impossible to work with buffers