engvidal Member Licensed User Longtime User Aug 26, 2016 #1 Hi Using this sub: Code: Copy Private Sub mqtt_MessageArrived (Topic As String, Payload() As Byte) Dim obj As Object = serializator.ConvertBytesToObject(Payload) Dim s As String = obj Label2.Text = s End Sub Just at start up, and after that, if I choose 'continue', on each message arriving, I get: java.io.IOException: Attachments 2016-08-25.png 483.9 KB · Views: 632
Hi Using this sub: Code: Copy Private Sub mqtt_MessageArrived (Topic As String, Payload() As Byte) Dim obj As Object = serializator.ConvertBytesToObject(Payload) Dim s As String = obj Label2.Text = s End Sub Just at start up, and after that, if I choose 'continue', on each message arriving, I get: java.io.IOException:
DonManfred Expert Licensed User Longtime User Aug 26, 2016 #2 Erel posted the solution here https://www.b4x.com/android/forum/threads/convert-array-of-bytes-to-string.70363/#post-446792 Why you still use the code you was using before??? Upvote 0
Erel posted the solution here https://www.b4x.com/android/forum/threads/convert-array-of-bytes-to-string.70363/#post-446792 Why you still use the code you was using before???
Erel B4X founder Staff member Licensed User Longtime User Aug 28, 2016 #3 If you still haven't resolved this issue then please post the code that sends the message. It is impossible to say how the payload should be treated without seeing it. Upvote 0
If you still haven't resolved this issue then please post the code that sends the message. It is impossible to say how the payload should be treated without seeing it.