Android Question B4A MQTT Question

Philip Prins

Active Member
Licensed User
Longtime User
I connect to the server thru a service but i get some times the following error;
In my code i have
B4X:
rivate Sub client_Connected (Success As Boolean)
    Log($"Connected: ${Success}"$)
    If Success Then
       
        If client.Connected = True Then
            MQTTconnected = True
        SubscribeMQTT(Klant&"/all/#", 0)
            SubscribeMQTT(RxMessageTopic,2)
            SubscribeMQTT(AllRxMessageTopic,2)
            SubscribeMQTT(RxAlarmTopic,2)
            SubscribeMQTT(fototopic,2)
            SubscribeMQTT(Allfototopic,2)
            SubscribeMQTT(updateuserstopic&"/NewStatus",2)
           
            SubscribeMQTT(updateuserstopic,0)
            SubscribeMQTT(personaltopic,2)
            SubscribeMQTT(loneworkerstopic,2)

Why do i get this error even when i use If client.connected = true?
 

rboeck

Well-Known Member
Licensed User
Longtime User
I had the same effect with B4J in this moment with cloudmqtt broker; i wanted to retry and debug, but the error is currently gone. I had also error code 32.104 in the log files in mqtt_Connected(...) and true as success value.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…