Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

display built-in emoji keys for inputmethod

I'm building a custom soft keyboard for android and would like to add a layout to include the emoji keys similar to what the default android keyboard (AOSP) is doing. I've searched around but it seems that most people are trying to display custom emoji from images. I'm looking to show the built-in icons that comes with Android (as shown below):

Android built-in emoji

It seems that I should be able to use the Unicode characters to send images from the keyboard, but my first attempt seems to generate only the older versions of the emojis. How do I support the latest emoji the phone can handle? Also, how do I display the emojis in my keyboard as in the image above?

like image 366
user1715925 Avatar asked May 02 '15 16:05

user1715925


2 Answers

Emoticons-Keyboard

1) instead emitos ,Iam replacing the ImageView containing an asset with a TextView containing a Unicode sequence.

After cross referencing Supported Unicode Sequences as well as the Visual Unicode Database I realized that **u1F601** was a 32 bit Unicode representation, and the 16bit representation can be set like :

EditText messageInput = (EditText) findViewById(R.id.message_input);
messageInput.getText().append("\ud83d\ude01");

2) http://android.appstorm.net/how-to/customization/how-to-use-emojis-on-your-android-device/

like image 188
NovusMobile Avatar answered Oct 01 '22 02:10

NovusMobile


Go to https://en.m.wikipedia.org/wiki/Emoji to see which emojis your device supports with unicode.

As you know which emoji is shown depends on the font you use, so to get the latest emojis use NotoColorEmoji.ttf as font for your app.

like image 23
leonardkraemer Avatar answered Oct 01 '22 04:10

leonardkraemer