Open GoogleCodeExporter opened 8 years ago
I noticed the same thing.
Is there someone who still develops or asmack? seems dead.
Original comment by fusion...@gmail.com
on 18 Mar 2011 at 9:42
Without really going into the library, a quick fix can be done with something
like:
1) create class Ping extends IQ implements IQProvider
2) add to ProviderManager -> pm.addIQProvider("ping", "urn:xmpp:ping", new
Ping());
3) create class PingPacketListener implements PacketListener which answers to a
Ping IQ :)
Hope it helps.
-s
Original comment by fusion...@gmail.com
on 19 Mar 2011 at 10:03
I just implement a sample code based on the above guideline :
http://www.softhinker.com/in-the-news/respondtoxmpppingtokeepidleclientalive
Original comment by qind...@softhinker.com
on 5 Mar 2012 at 3:37
You will find a version which contains a fix for this issue at the new home of
aSmack: https://github.com/flowdalic/asmack
Original comment by fschm...@gmail.com
on 20 Feb 2013 at 4:40
okay
asmack does not support ping replies, So I have a very little hack. I was
facing this issue, What I did is that, I just made a listener
PacketListener myListener = new PacketListener().....
then registered it with
connection.addPacketListener(myListener, new PacketTypeFilter(Packet.class));
so in processPacket method of my listener I just checked the packet instance
if(packet instanceof Ping) {
Ping ping = new Ping();
ping.setTo(packet.getFrom());
ping.setType(Type.RESULT);
connection.sendPacket(ping);
}
thats it..
in openfire documentation, it is mentioned that, if you client responses with
any result, it is considered to be alive...
Original comment by moonza...@gmail.com
on 14 Nov 2013 at 7:16
aSmack does support XMPP ping. Your code is not needed and btw incomplete
because it doesn't register ping with the service discovery manager.
Original comment by fschm...@gmail.com
on 16 Nov 2013 at 10:15
Original issue reported on code.google.com by
cwyson...@gmail.com
on 31 Jan 2011 at 2:22