I wonder how whatsapp gives support for that. I could use emojis on iPhone because it is natively supported. I\'m not developing for bb neither android but I need to help a code
From my experience most emoticons (emoji) do not use a font, but are rather bitmap graphics (e.g. emoticons in the default Android text editor). There are several downsides to using a font:
Using bitmap graphics will allow you to easily use the same emoticons across a wide range of devices, whilst using standard device fonts the text around the emoticons.
You will have to parse the string that you are displaying, find the emoticons, and replace them with images.
On Android for instance you would accomplish this with:
(althugh change emoticon.png based on the type of emoticon)String myHtmlString = Html.fromHtml(myEmoticonString, myImageGetter, null);
myTextView.setText(myHtmlString)
In step 3 myImageGetter
needs to be an instance of Html.ImageGetter
which returns a graphic (drawable) based on the src
attribute of the images in the string (ie it converts a string file name to an actual graphic)
The steps on other platforms would be different but you should be able to use the same basic method (parse string, replace emoticons with images).