Reconnecting From Airplane Mode With Mqtt Android Service
I am implementing the Dale Lane MQTT Android Service Example found here http://dalelane.co.uk/blog/?p=1599, the example is working pretty well for my specific purpose, but I am dea
Solution 1:
Download the latest android service jar(1.02) and java client(1.02) from paho. Latest Android service jars have the fix for this issue. It takes care for reconnecting once the network connection is back.
add this inside onResume() of the Activity
mqttclient.registerResources(this);
and this inside onDestroy() of the same Activity
mqttclient.unregisterResources();
this worked for me.
Post a Comment for "Reconnecting From Airplane Mode With Mqtt Android Service"