// Check if there is any unread mail, it there is, post rean notification event private void handleNotification() { // post a notification read event // if there is no unread count, also post a read event to trigger the menu button refresh // Clear the stored unread message number before trigger event First.getClientFactory().getStorage().setItem("unreadmail", "0"); EventBus eventBus = First.getClientFactory().getEventBus(); Map<String, String> notification = new HashMap<String, String>(); notification.put("messageType", "mail"); // set the type of notification // Send out the push notification read event eventBus.fireEvent(new NotificationReadEvent(notification)); }