Skip to content Skip to sidebar Skip to footer

How To Set Unicode In Textview To Show Emoji In Android?

I am getting some Unicode string(emoji icons) from server in json string format. My problem is strange and I am trying for last two days to resolve this issue. When I parse json an

Solution 1:

This sounds like you want to unescape your string that you've got from JSON. If you don't mind adding a library, Apache Commons has a String.unescapeJava function which does what you need. If you don't want to add that library, see this answer.

Solution 2:

This is what has worked for me ( Kotlin version ):

textView.text = String(Character.toChars(0x1F389))

Post a Comment for "How To Set Unicode In Textview To Show Emoji In Android?"