XMPP messages lost on Android while switching data connectivity (e.g. turning Wifi of, GSM <-> Wifi switch)

前端 未结 5 464
无人共我
无人共我 2020-12-30 05:40

I\'m developing a chat application in android. Using XMPP server. PHP server has been migrated to ejabber.

My notification works properly in all scenarios. But in o

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-30 06:04

    You need "Stream Management" XEP-198 enabled connections to achieve this. Georg wrote a good blog entry about that topic: http://op-co.de/blog/posts/XEP-0198/ Basically it allows for stanza acknowledgement and stream resumption, which is exaclty what you want to do in case of e.g a Wifi <-> GSM switch.

    I conclude from the stacktrace that you are using aSmack (which is Smack ported to Android). There is a open feature request to implement Stream Management in Smack: SMACK-333. In fact, i've recently started working on the implementation, but can't name an ETA.

提交回复
热议问题