Skip to main content

[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

Phone: 01962 815438 | Extension: x372454
E-mail: 
Personal Website: www.jsutton.co.uk
Find me on:      
IBM

Hursley Park
HursleySO212JN
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?
 
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev
 
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


Back to the top