code: public static boolean isOnlyEmojis(@Nullable final String text) {
      if (!TextUtils.isEmpty(text)) {
        final String inputWithoutSpaces = SPACE_REMOVAL.matcher(text).replaceAll(Matcher.quoteReplacement(""));
  
        return EmojiManager.getInstance()
              .getEmojiRepetitivePattern()
              .matcher(inputWithoutSpaces)
              .matches();
      }
  
      return false;
    }
docs: returns true when the string contains only emojis. Note that whitespace will be filtered out.