Hi there!
I am developing a small app that turns a light on / off on my arduino through an Android App.
I did copy the Starter code used in MQTT official examples, with the working boolean and the sub ConnectAndReconnect, etc.
Whenever I start my app, it takes about 5 - 10 seconds to get into the main code and showing my layout.
Is as it freezes on Service_create and ConnectAndReconnect subs ... there are two Sleep(5000) thrown in there which I suspect are responsible for the freeze. But I thought that the Starter code was asynchronous.
Please any explanation or hint is welcome, I am not proficient on this.
Regards,
Enrique
I am developing a small app that turns a light on / off on my arduino through an Android App.
I did copy the Starter code used in MQTT official examples, with the working boolean and the sub ConnectAndReconnect, etc.
Whenever I start my app, it takes about 5 - 10 seconds to get into the main code and showing my layout.
Is as it freezes on Service_create and ConnectAndReconnect subs ... there are two Sleep(5000) thrown in there which I suspect are responsible for the freeze. But I thought that the Starter code was asynchronous.
Please any explanation or hint is welcome, I am not proficient on this.
Regards,
Enrique