-2

I have tried the methods posted online, but they use external libraries. Is there a way to do it natively?

  • https://stackoverflow.com/a/26894146/8202132 This link might help – Ananth Nov 25 '19 at 11:57
  • 1
    Does this answer your question? [How to set emoji by unicode in a textview?](https://stackoverflow.com/questions/26893796/how-to-set-emoji-by-unicode-in-a-textview) – Ananth Nov 25 '19 at 11:59

1 Answers1

0

It's easy. Look at this implementation. There's a function which converts the unicode emoji into char so you can append it to the string being displayed in your textview/edittext.

Source: https://www.youtube.com/watch?v=UHzhWbmdkWM

        # This is in oncreate

          int unicode=0x1F600;
          String emoji= getEmoji(unicode);

        # Our new function

          public String getEmoji(int uni)
          {
              return new String(Character.toChars(uni));
          }