Android Question string to bytes for jmqtt

Victor jung

Member
Licensed User
Longtime User
Hello,
I am trying to play with the jmqtt library.
But I have trouble going from bytes to string and reverse for the payload...
Stringtobytes https://www.b4x.com/android/help/byteconverter.html
seems a great method for this but it seem's to have disappeared, or at least i can't figure how to use it...
I tried using serializator:

B4X:
Sub Button1_Click
    client.Publish2("hello", serializator.ConvertObjectToBytes("CLIC"), 0, False)
End Sub

my issue is that it's not received by any b4x code, so I don't know how to read the "crap" sent with this method.

Any ideas or input are welcomed.
Thank you verry much.
Victor
 

Victor jung

Member
Licensed User
Longtime User
Hello erel,
Thanks for the quick reply,
is there another quick trick to do this the other way around?
bytes to string?
Victor
oops, sorry I didn't read it properly!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…