powered by Jive Software

User still showing available after uninstalling app or disconnecting network

I am using sticky service, to create connection.
When i uninstalled application or disconnect network, user still shows available on Spark.
How i can close connection successfully.

What client are you using on Android?

I developed client myself, using smack 4.2.3. After successful XMPP connection if user uninstalled app or disconnected network, that user still showing online on spark client.

Thats very likely caused by your client not sending a unavailable presence before getting stopped. The server is probably waiting a few minutes for your client to come back.

How i can send presence if network lost.
I checked server is waiting more than 10-15 min to come back user then showing unavailable.

If you are using Openfire, then in Admin Console there is a setting at Server Settings > Client Connections - Idle Connection Policy. You can set it to a lower setting. But that would mean more frequents reconnects for your clients as mobile internet is prone to often bad or lost signal. So, you have a choice of either having offline users showing as online for some time or having frequent reconnects for all users.

i am using Mongoose IM,
mod_ping is enabled - {mod_ping, [{send_pings, true}, {ping_interval, 60} , {timeout_action, kill}]},

I’m sure the mongoose IM guys can help you better then :slight_smile: