Android Question MqttClient - send info to clients no using B4X

mmanso

Active Member
Licensed User
Longtime User
Hi All,

When we use the MqttClient in B4A it expects us to send Bytes(). We "feed" it with something like:

serializator.ConvertObjectToBytes(var)

How do you deal with other clients that are connected to the same mqtt broker? It's possible o send JSON or something between clients?

Thanks.
 

DonManfred

Expert
Licensed User
Longtime User
It's possible o send JSON or something between clients?
Create a json and send this. Other clients (others than B4X) are not able to read or send serialized content.
B4X:
dim json as String
' fill json with the jsondata
mqtt.send(json.GetBytes("UTF8")) ' Or whatever commands you need to use.
 
Last edited:
Upvote 1
Cookies are required to use this site. You must accept them to continue using the site. Learn more…