code: public static void addNotificationsRequests(Message message, boolean offline,
              boolean delivered, boolean displayed, boolean composing) {
          // Create a MessageEvent Package and add it to the message
          MessageEvent messageEvent = new MessageEvent();
          messageEvent.setOffline(offline);
          messageEvent.setDelivered(delivered);
          messageEvent.setDisplayed(displayed);
          messageEvent.setComposing(composing);
          message.addExtension(messageEvent);
      }
docs: Adds event notification requests to a message. For each event type that
  the user wishes event notifications from the message recipient for, <tt>true</tt>
  should be passed in to this method.
  
  @param message the message to add the requested notifications.
  @param offline specifies if the offline event is requested.
  @param delivered specifies if the delivered event is requested.
  @param displayed specifies if the displayed event is requested.
  @param composing specifies if the composing event is requested.