public static void addUnreadMessagesListener(final UnreadMessagesListener listener) {
		dispatchConversationTask(new ConversationDispatchTask() {
			@Override
			protected boolean execute(Conversation conversation) {
				conversation.getMessageManager().addHostUnreadMessagesListener(listener);
				return true;
			}
		}, "add unread message listener");
	}
public static void addUnreadMessagesListener ( final UnreadMessagesListener listener ) { dispatchConversationTask ( new ConversationDispatchTask ( ) { @ Override protected boolean execute ( Conversation conversation ) { conversation . getMessageManager ( ) . addHostUnreadMessagesListener ( listener ) ; return true ; } } , "add unread message listener" ) ; }
Add a listener to be notified when the number of unread messages in the Message Center changes.

@param listener An UnreadMessagesListener that you instantiate. Do not pass in an anonymous class.
Instead, create your listener as an instance variable and pass that in. This
allows us to keep a weak reference to avoid memory leaks.