How to set emoji by unicode in a textview?

Found a solution:

In my unicode I replaced ‘U+‘ by ‘0x

Example: replace ‘U+1F60A‘ by ‘0x1F60A

This way I got an ‘int’ like

int unicode = 0x1F60A;

Which can be used with

public String getEmojiByUnicode(int unicode){
    return new String(Character.toChars(unicode));
}

So Textview displays 😊 without Drawable

Try it with http://apps.timwhitlock.info/emoji/tables/unicode

Leave a Comment

tech