开发者

processMessage(Chat chat, Message message) not working in Android

开发者 https://www.devze.com 2023-03-12 17:40 出处:网络
I am using aSmack-2010.05.07 XMPP library for writing down chat application on android, Here is my associated code,

I am using aSmack-2010.05.07 XMPP library for writing down chat application on android,

Here is my associated code,

chatManager = LoginScreen.getConnection().getChatManager();

 System.out.println("Chat Manager created .......");



    chat = chatManager.createChat(JID,new MessageListener() 
     {
        public void processMessage(Chat arg0, Message message) 
        {
            System.out.println("MSG = "+message.getBody());

            displayReceivedMesage(message.getBody());
开发者_高级运维        }
    });

but displayReceiveMessage()function never gets called, concludes that means the function

processMessage() doesn't hit at all.

Please Help me I am stuck here very badly.

Any help will be appreciable.

Best Regards,

~Anup


you should replace your System.out.println with Log . System.out.println will not working on Android,


System.out will print to /dev/null by default so you can't see anything of your printed lines.

0

精彩评论

暂无评论...
验证码 换一张
取 消