How to detect emoticons in EditText in android
I want to detect whether my EditText contains smilie (emoticons) or not. But I have no idea that how to detect them. To disable emoji characters when typing on the keyboard I using the following filter: InputFilter filter = new InputFilter() { @Override public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { for (int i = start; i < end; i++) { int type = Character.getType(source.charAt(i)); //System.out.println("Type : " + type); if (type == Character.SURROGATE || type == Character.OTHER_SYMBOL) { return ""; } } return null; } };