1

I want to use unicodes instead of emoji(Drawable Images). Can anybody help !!! All I got Libraries for emoji in which we are using drawable images but I want to replace these with Unicode. Is it possible ??

AskNilesh
  • 67,701
  • 16
  • 123
  • 163
Renu
  • 69
  • 8
  • this link may help you https://stackoverflow.com/questions/26893796/how-set-emoji-by-unicode-in-android-textview – AskNilesh Aug 16 '17 at 10:57
  • key board from which emoji gt selected is having images. I don't want store any image for emoji in my drawable. How I display emojis on keyboard using unicode ?? – Renu Aug 16 '17 at 11:15

2 Answers2

1

I sovled it by replacing full keyboard (List of emojis) with Unicode chars in place of emoji

Renu
  • 69
  • 8
0

While the answer suggested does work, the reason you're finding libraries for emoji is because emoji on Android is very fragmented and very device specific.

From my experience, it's very hard to guarantee a emoji will show up on all devices.

The linked answer would work, but you should test the emoji you want to use on difference devices.

int unicode = 0x1F60A;

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

myTextView.setText( getEmojiByUnicode( unicode ) );
advice
  • 5,778
  • 10
  • 33
  • 60
  • key board from which emoji gt selected is having images. I don't want store any image for emoji in my drawable. – Renu Aug 16 '17 at 11:10
  • If the user is entering emoji via the keyboard to an `EditText` or something, I believe it should still be unicode. Are you trying to display emoji or are you getting emoji put in? – advice Aug 16 '17 at 11:14
  • Actually user enter emoji via the keyboard, on keyboard we are having images, I want to replace those images by unicode. yeah the emojis'll convert into unicode in EditText or in TextView. but I want to Display emojis on keyboard via Unicode. – Renu Aug 16 '17 at 11:25