Skip to content Skip to sidebar Skip to footer

Android Chat Application Emoji's Issue

I am working on Android chat application. Now I want to send emoji's in my chat module. How can i implement emoji' in chat application? Please guide me for this app. If there is a

Solution 1:

There is no specific api available to implement and send emojis. You can achieve this using ImageSpan objects. The TextViews and EditTexts use Spanned/Spannable objects to store the entered text content, not just mere Java Strings. On these Spanned/Spannable objects you can define spans for sections on the text that modifies the way that those sections are shown. So you can display images in place of certain sections.

Check the docs:

Also, I found a blog, it might be helpful for you.

Solution 2:

This Library is all you need to implement Emojicons. Just don't forget to change your TextViews and EditTexts to this Library's EmojiconTextViews and EmojiconEditTexts respectively.

Hope this helps.

Solution 3:

You need to encode emoji before upload. in this way you encode emoji to UTF code

try {
                String mystring = URLEncoder.encode(strComments, HTTP.UTF_8);
                param.add(new BasicNameValuePair("comment", mystring));

            } catch (UnsupportedEncodingException e) {
                e.printStackTrace();
            }

for decoding

enter code here


try {
            StringTitle= URLDecoder.decode(comment, "UTF-8");
            holder.tvComment.setText(Title);
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }

Post a Comment for "Android Chat Application Emoji's Issue"