I have some problem with displaying emoji icon in Android TextView
First, I found a list of emoji icon in unicode at here: http://www.easyapns.com/category/just-for-
It works fine if you convert the string to a char array and check each char, such as:
StringBuilder sb = new StringBuilder();
for (char curr : str.toCharArray()) {
sb.append((SUPPORTED_EMOJI_SET.contains(curr)) ? convertCharToImgTag(curr) : curr);
}
where SUPPORTED_EMOJI_SET is just a set of chars, for example:
new HashSet() {{
add('\ue415');
add('\ue056');
...
}}
You could also do this with a regex but I believe the above would run faster.