I would like to find how many emojis the user has input into an EditText. If the user only enters emojis, and uses 3 or less, I want to be able to display that
int emojiCount = 0;
for (int i = 0; i < yourString.length(); i++) {
int type = Character.getType(yourString.charAt(i));
if (type == Character.SURROGATE || type == Character.OTHER_SYMBOL) {
emojiCount++;
}
}
return emojiCount/2;