I use 2.1.1 Android SDK and want to notify user about new incoming messages received by application.
Here is the issue. I would like to notify user as he launches application, thus i would like to add listener at the stage of "user login" as it's shown in the snippet:
QBAuth.createSession(user, new QBEntityCallbackImpl<QBSession>() {
@Override
public void onSuccess(QBSession session, Bundle args) {
// login to Chat
chatService.login(user, new QBEntityCallbackImpl() {
@Override
public void onSuccess() {
HERE I WOULD LIKE A CODE TO START LISTEN FOR ALL INCOMING MESSAGES
As per http://sdk.quickblox.com/android/com/quickblox/chat/listeners/QBMessageListenerImpl.html listener needs chat QBChat to initiate. But I would like to listen for all of the messages, not only within particular chat.
Long story short, how to implement a message listener to catch all messages addressed to logged in user?