问题描述
我使用asmack库的XMPP聊天应用程序。我有一些问题,在收到一些自定义的IQ数据包。搜索结果
这是我的 PacketListener
code:
I am using asmack library for an XMPP chat application. I have some issues in receiving few custom IQ packets.
This is my PacketListener
code :
PacketTypeFilter filter = new PacketTypeFilter(Packet.class);
connection.addPacketListener(new PacketListener() {
@Override
public void processPacket(Packet packet) {
Log.i("PacketListener : ", "Received Packet in General : "
+ packet.toXML());
}
}, filter);
它接收一些智商的数据包,但不接收其他一些IQ的数据包。但是,该asmack库能够标签啪和preFIX作为下的logcat的接收和打印所有的IQ数据包RCV(1):
It receives some IQ packets, but doesn't receive some other IQ packets. But, the asmack library is able to receive and print all the IQ packets in the Logcat under the Tag "SMACK" and a prefix as "RCV (1): ".
任何建议,以获得在 PacketListener
?结果中的所有数据包的智商
请让我知道,如果事情是不是在这个问题明确通过添加注释。
Any suggestions to receive all the IQ packets inside PacketListener
?
Please, let me know if something is not clear in the question by adding comments.
推荐答案
最后,我也能够接收使用此code的顺口溜IQ数据包
Finally, I could able to receive the jingle IQ packets using this code
https://github.com/bejayoharen/java-bells/tree/master/src/net/java/sip/communicator/impl/protocol/jabber/extensions/jingle
这篇关于asmack:在PacketListener接收定制的IQ消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!