Exemple #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (isExiting()) {
      return;
    }
    try {
      addChatEventListener(mChatService);
      ChatServiceConfiguration configuration = mChatService.getConfiguration();
      /* Set max label length */
      int maxMsgLength = configuration.getGroupChatMessageMaxLength();
      if (maxMsgLength > 0) {
        // Set the message composer max length
        InputFilter[] filterArray = new InputFilter[1];
        filterArray[0] = new InputFilter.LengthFilter(maxMsgLength);
        mComposeText.setFilters(filterArray);
      }
      mComposingManager =
          new IsComposingManager(configuration.getIsComposingTimeout(), getNotifyComposing());

    } catch (RcsServiceException e) {
      showExceptionThenExit(e);
    }
    if (LogUtils.isActive) {
      Log.d(LOGTAG, "onCreate");
    }
  }