code: public void addListener(final TypingListener typingListener) {
          if (typingListener != null) {
              MessagingListener messagingListener = new MessagingListener() {
  
                  @Override
                  public void onParticipantIsTyping(ParticipantTypingEvent event) {
                      typingListener.participantTyping(event.getConversationId(), event.getProfileId(), true);
                  }
  
                  @Override
                  public void onParticipantTypingOff(ParticipantTypingOffEvent event) {
                      typingListener.participantTyping(event.getConversationId(), event.getProfileId(), false);
                  }
              };
              typingListeners.put(typingListener, messagingListener);
              client.addListener(messagingListener);
          }
      }
docs: Registers listener for user is typing/finished typing events.
  
  @param typingListener Listener for user is typing/finished typing events.