[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [paho-dev] How to reconnect MqttAndroidClient in poor network conditions
|
MqttConnection.reconnect() is really just an internal function that allows the client to reconnect if it is currently in disconnected state AND cleanSession is false. The reason for this is that if the device moves from not having an internet connection to then having one (i.e. connecting to Wifi) then reconnect() will be called allowing the client to continue as if nothing had happened. It's not really meant to be used by a developer directly.
Currently I'm working on adding true Automatic Reconnect and Offline Buffering functionality to the Java client (Which the Android service uses), once that is in the Java client, the Android client will then be updated to take better advantage of this. This will expose a new public reconnect function that the developer can call to force a reconnect cycle. This should be available in the SNAPSHOT library in the coming weeks...
Kind regards,
James Sutton Software Engineer - IoT Foundation - MQTT Open Source Projects Technical Trojan - Wimbledon Project |
|
| Hursley Park Hursley, SO212JN United Kingdom |
IBM United Kingdom Limited Registered in England and Wales with number 741598 Registered office: PO Box 41, North Harbour, Portsmouth, Hants. PO6 3AU
----- Original message -----
From: "zhangkai.gis"<zhangkai.gis@xxxxxxx>
Sent by: paho-dev-bounces@xxxxxxxxxxx
To: "General development discussions for paho project"<paho-dev@xxxxxxxxxxx>
Cc:
Subject: Re: [paho-dev] How to reconnect MqttAndroidClient in poor network conditions
Date: Sat, Feb 27, 2016 7:19 AM
How to use MqttConnection.reconnect?
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU