Quantcast
Channel: Ignite Realtime : Unanswered Discussions - Support
Viewing all articles
Browse latest Browse all 4979

Android chat using smack

$
0
0

Hello  everyone,

Following is  a code snippet from chat.java class of Smack library, in some case the number of listeners is zero, and my chat wont works but when the listeners is created chat works,

but i am unable to understand under which conditions the listeners are created successfully, can anyone suggest me the reason .

 

void deliver(Message message) {

        // Because the collector and listeners are expecting a thread ID with

        // a specific value, set the thread ID on the message even though it

        // probably never had one.

        message.setThread(threadID);

 

 

        for (MessageListener listener : listeners) {

            listener.processMessage(this, message);

        }

    }


Viewing all articles
Browse latest Browse all 4979

Trending Articles