cmeng

Smack V4.2.0-beta3 MessageEventRequestListener implementation requirements

Discussion created by cmeng on Dec 9, 2016
Latest reply on Dec 16, 2016 by cmeng

One last issue encountered while porting aTalk to use Smack version 4.2.0 which does not occur in smack 4.1.8. The problem occurred when atalk-android receives a chat message from jitsi-windows. Attached below is the captured smack log. It seems that exceptions are triggered because of the events <x xmlns='jabber:x:event'><offline/><composing/></x> in the received chat message. There is no problem when jitsi-android sends a chat message to jitsi-windows which contains the same event in the message.

 

atalk-android has implemented private class JabberMessageEventRequestListener implements MessageEventRequestListener

and has executed the following upon user registration is completed 

messageEventManager = MessageEventManager.getInstanceFor(parentProvider.getConnection());
messageEventManager.addMessageEventRequestListener(new JabberMessageEventRequestListener());

 

What else I need to do to resolve the problem?  Appreciate if someone can give me some advice.

 

Thanking in advance.

 

===================================================================

12-10 11:39:30.813 10224-10969 D/SMACK: RECV (0): <message from='abc123@icrypto.com/jitsi-17lga8s' to='leopard@icrypto.com/atalk' id='1481341163939539187399' type='chat'><body>?OTR:AAMSCCyqcgFBmfQAAAHSDHiKZWR5Fvojo2UMS++oGM7OjEeQ91zPICbN 1rQn1XY6AbrqtM8ylQIxIph+PSItfRgIHzNScFIy/RtpFVT9DgSfhpFvwyq3LFvYjvi0hWjn658Wv4uR Km7I5AP8feRcskDg931EXF64l8pkdoFMsScNwkYC9TfEwPNvmbFYQz9GSCdMHj1jBSUESX0Iu+hGOsnY 6Y7UaQY7d3q8O+Xgq5ccf0PnpOVwAD/FF7Jr9Nz5wWHFmVLZzYRiRJC5q7We+Pj1SQhwXwxpJa/6I2iW 9SJsHUG9OvMrqBD1SpuwxFw4iTxA6YNXh/sJL2mDAPXEBalt+SljchCaF0/aC4IZmzeufeEfnDDHa6qd juiBkrpjJVcx6a86DIauV0md8QLgXdw3F4UOnreXo7T+Q0C31AVxAqAytlOoXzuwEDYLSYU9eObg6j1I 7FARTi5Ke6gpX4IOr740GeE3QPmQM9a7BnixoBJ1sUFfKbPDzJv8b4ZH3nymWasPnTG2t9gpAQnHc+LS +lvqBhbqGKr8vgzMualG/Rj37WRG2TpnGksSNFx1NiePLfT7AJwWzP8oRnkaonCXpwemqQLG62cDVgtM ZCIzAEDe8+6W8XGo/ttIQYLVtZ3165keG69djeFFIA45287w/qCl.</body><thread>w8p7l0</thre ad><x xmlns='jabber:x:event'><offline/><composing/></x></message>

12-10 11:39:30.823 10224-10969 D/SMACK: RECV (0): <r xmlns='urn:xmpp:sm:3'/>

12-10 11:39:30.823 10224-10968 D/SMACK: SENT (0): <a xmlns='urn:xmpp:sm:3' h='12'/>

12-10 11:39:30.833 10224-11011 E/αTalk: [10] org.jivesoftware.smackx.xevent.MessageEventManager.fireMessageEventRequestListe ners() Error while invoking MessageEventRequestListener

                                        java.lang.NoSuchMethodException: composingNotificationRequested [class java.lang.String, class java.lang.String, class org.jivesoftware.smackx.xevent.MessageEventManager]

                                            at java.lang.Class.getDeclaredMethod(Class.java:635)

                                            at org.jivesoftware.smackx.xevent.MessageEventManager.fireMessageEventRequestListe ners(MessageEventManager.java:175)

                                            at org.jivesoftware.smackx.xevent.MessageEventManager.access$000(MessageEventManag er.java:51)

                                            at org.jivesoftware.smackx.xevent.MessageEventManager$1.processPacket(MessageEvent Manager.java:87)

                                            at org.jivesoftware.smack.AbstractXMPPConnection$4.run(AbstractXMPPConnection.java :1138)

                                            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)

                                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)

                                            at java.lang.Thread.run(Thread.java:818)

12-10 11:39:30.833 10224-11011 E/αTalk: [10] org.jivesoftware.smackx.xevent.MessageEventManager.fireMessageEventRequestListe ners() Error while invoking MessageEventRequestListener

                                        java.lang.NoSuchMethodException: offlineNotificationRequested [class java.lang.String, class java.lang.String, class org.jivesoftware.smackx.xevent.MessageEventManager]

                                            at java.lang.Class.getDeclaredMethod(Class.java:635)

                                            at org.jivesoftware.smackx.xevent.MessageEventManager.fireMessageEventRequestListe ners(MessageEventManager.java:175)

                                            at org.jivesoftware.smackx.xevent.MessageEventManager.access$000(MessageEventManag er.java:51)

                                            at org.jivesoftware.smackx.xevent.MessageEventManager$1.processPacket(MessageEvent Manager.java:87)

                                            at org.jivesoftware.smack.AbstractXMPPConnection$4.run(AbstractXMPPConnection.java :1138)

                                            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)

                                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)

                                            at java.lang.Thread.run(Thread.java:818)

Outcomes