AnsweredAssumed Answered

Smack Reconnection issue.

Question asked by Sandeep Shinde on Mar 3, 2016

Hello everyone,

 

1.) I am developing chat application. We have one background service continuously running so that in case there is connection loss so that we can reconnect automatically and there is no message loss. But many times the reconnecting doesn't work.

 

2.) There is also one scenario in which after 10 to 12 hours the reconnection stop working and after some time it again starts .I am using Stream management, when I switch network some times same message comes twice.

 

3.) Also need help in reading stanza body.

 

<message to='sandeep004@example' id='OSk0f-644' type='chat'><subject></subject><body>Hu</body><thread>712a5885-8d5f-43c2-8b71-3 54d1fd74a34</thread><request xmlns='urn:xmpp:receipts'/><active xmlns='http://jabber.org/protocol/chatstates'/></message>

D/SMACK: RECV (0): <message to="darshana@example/resid" id="i9ah9-203" type="chat" from="sandeep004@example/resid"><received xmlns="urn:xmpp:receipts" id="OSk0f-644"/></message>

D/SMACK: RECV (0): <message to="darshana@example/resid" id="i9ah9-203" type="chat" from="sandeep004@example/resid"><received xmlns="urn:xmpp:receipts" id="OSk0f-644"></received><delay xmlns="urn:xmpp:delay" stamp="2016-03-03T12:47:05.279Z" from="example"></delay></message>

 

Thanks in Advance.

Outcomes