How to set emojis like WhatsApp chat instead of mobile specific [closed]
Asked Answered
E

2

9

I'm working on one project in that I export WhatsApp chat and set in TextView. Emojis used in chat is actual WhatsApp emojis but when I set in TextView it shows as Android emojis depends on the device.

Question: how to set whats app emojis in TextView?

Try: all I can find is how to make custom keyboard and libraries for custom keyboard**(i don't want to make custom emojies keyboard, unless that's the only option)** but I'm not sending any data. I'm just getting data and set in TextVeiw I'm wondering if anybody can guide. enter image description here,

Expel answered 25/3, 2019 at 15:12 Comment(4)
I wonder how to export whatsapp data??Madore
@PankajKumar hi pankaj, that's completely different question, but answer is yes you can. if you want to know more i will tell you in detail.Expel
@PankajKumar On Aug 2nd 2018, WhatsApp released the so-called WhatsApp Business API into a limited public preview. It seems very selected customers like KLM or Booking.com got access to this API already. Everyone can apply for an API key, but it seems like WhatsApp is very selective currently. Moreover, Facebook seems to see this as a way to monetize WhatsApp and thus charges companies for each message which is not a direct answer to a customers message within 24 hours.Expel
Very informative. Thank you :)Madore
S
6

Emoji is Unicode just like any other character, that's why it's displaying system emojis even when you are using the WhatsApp messages in TextView. To display custom emojis like WhatsApp you have to implement it yourself. Check out this library it may help.

Some other libraries: Emoji Emoji Keyboard

Also, take a look at Android Emoji Compatibility Library

Even if you are not trying to send data, you can use these libraries to just display text and emojis with their respective custom TextView.

Spotter answered 3/4, 2019 at 10:32 Comment(6)
thank you for your answer i will look it and get back to you.Expel
are you sure i have to implement by my self? and for displaying emojis use above library quite complicated!Expel
@RuchaBhattJoshi Yes. As I mentioned in the answer, an emoji is just Unicode. WhatsApp uses its own custom emojis instead of the default one. But when you copy or export messages from the app it only copies the Unicode, not the emoji, so when you use that in your app which doesn't have custom emojis, the app displays the available system emojis.Spotter
@RuchaBhattJoshi Think of this scenario, what happens when you copy some text from a website to MS word that uses some font that you haven't installed on your system, the application will replace the font with an available one. Something similar happening here too.Spotter
that's make sense to me! let me try first lets see how it goes,thank you so much.Expel
it works i used first link which you suggested thank you so much :)Expel
D
2

First of you need to design your own emojis for your app and then replace it with the system emoji unicode so when user types Android default emojis then it will be replaced by your custom emojis. Check this link for how it works

Distinguishing answered 8/4, 2019 at 18:54 Comment(1)
sorry but may be you misunderstood my question, i dont want my custom emojies i want to set whatsapp emojies but when i tried to do that it only sets system specific emojies.Expel

© 2022 - 2024 — McMap. All rights reserved.