/** * Send text message * * @param text to send. * @param clearEditText if true clear the message edit text. */ public void sendMessage(String text, boolean clearEditText) { if (StringUtils.isEmpty(text) || StringUtils.isBlank(text)) { return; } handleMessageSend(ChatSDK.thread().sendMessageWithText(text.trim(), thread)); if (clearEditText && textInputView != null) { textInputView.clearText(); } stopTyping(false); scrollListTo(ListPosition.Bottom, false); }