[Xposed Framework Modules] rovo89:
Example smiley packs / Format description

Smiley packs

AOSP: Default smileys from AOSP 4.2. That's not a big effect as your phone probably uses them already, but might be a good starting point for smiley packs. Especially if you have replaced the smiley graphics in the MMS.apk previously as you just need to replace the images.

Kolobok (attached): I use this one for myself. It contains the animated Kolobok smileys, which are simply lovely.

HTC Sense by noooooo

Emoji by noooooo

Facebook by Suprash

Facebook Messenger by Suprash/saywhatt

ICQ by noooooo

Yolks by saywhatt/bad-blood

IconTexto by saywhatt/IconTexto

Sony Xperia by m1l4droid

Hangouts by noooooo

tuzki animated transparent by justnoone

Skype smiley (Animated) by sasadara

Samsung ChatOn Emoticons by justnoone

Full Yahoo Emoticons Pack by MFaust

Galaxy Note Stock Emojis by justnoone

Cut the Rope by AlkaDragos

Facebook stickers by noooooo

BlackBerry Messenger by marsigliah

Huawei by MFaust

Kik Smileys by marsigliah

HeyWire Emoticons by marsigliah

LINE Stickers by marsigliah

Xperia Z1 by beatrat

Square by daniel_m

And a bit special, for those who don't want to have any smileys at all:

No smileys by m477m

File format

General

A smiley pack is a zip file consisting of a few text files for the metadata and of course the images, all directly in the zip (no subfolders).

I recommend to use "xyz.smileys.zip". Files ending with ".smileys.zip" can be opened and imported directly (unless your file browser insists on opending zip files itself).

In case you want to use characters like umlauts, you need to use UTF-8 character encoding without Byte Order Mark (BOM). I'm using Notepad++, where you can easily select this from the menu.

There is no limit of smileys, however keep in mind that quantity is not everything and that the smileys are local to the phone where the smiley pack is installed. Limit yourself to smileys you and your conversation partners actually send.

Images

I recommend to use png for static smileys and gif for animated smileys. In theory, other file formats like bmp should be supported, but it's untested and probably doesn't add any value. Transparency has to be included in the file itself, i.e. you should see it in the Windows image preview or whatever you are using.

The image size should be something between 20-30px, close to what they are normally display. The images are scaled automatically to match the text height.

info.txt

The first line of this file is the title of the smiley pack. All following lines are the summary.

codes.txt

This file contains a mapping between the images and the codes they replace. There is one line per smiley, empty lines and lines starting with a hash (#) are ignored. Each line has to start with the filename, then one or more blanks, then the main code (which is displayed in the "insert smiley" dialog), then optionally further codes, separated by one or more blanks. For example:

smile.gif :) :) =)

This would define a smiley with the (animated) image smile.gif, the main code ":)" as well as further codes ":)" and "=)". Any occurences of these codes will be replaced with the smiley image.

Only smileys defined in this file will be considered, any other images will be ignored. This file also defines the order of the smileys in various lists. The first smiley in this file will be used for the preview in the "choose smiley pack" screen.

descriptions.txt

Here, the texts displayed next to the smileys are defined. The format is similar to the one of codes.txt. The first field is again the filename, which is followed by one or more blanks. Everything after that is the smiley text. If no description is given for a smiley, the filename without extension will be used.

I recommend to re-use the texts of the builtin smileys if possible. You can do that with the dummy description "DEFAULT:XYZ", where XYZ stands for default smiley. Have a look at the AOSP smileys for a list of all supported smileys and the corresponding texts. As the texts will be taken from the installed MMS/SMS app, the text might vary slightly. But the good thing is: Translations are applied as well, so you profit from a wide range of supported languages.

Examples:

smile.gif I'm so happy
sad.gif DEFAULT:SAD

Translations

As mentioned in the previous section, the easiest way to get translations is using "DEFAULT:XYZ" whenever possible. However, you might want to add completely new smileys. If you just add the text to descriptions.txt, it will be used for all languages.

To add translations for selected smileys, you can create files like "descriptions-de.txt" (language) and "descriptions-pt-rBR" (language and region). This is the same naming convention as used for Android resources. In these files, you use the same format as in descriptions.txt, however you should only include those smileys which you want to translate. Other texts are inherited from more general files, which means that everything not translated in e.g. descriptions-pt-rBR.txt will be taken from descriptions-pt.txt. If it doesn't exist there either, it's taken from descriptions.txt. The last fallback is the filename without extension as mentioned before. So you don't need to repeat the text from those general files, especially not the "DEFAULT:XYZ" texts.

That's it, I think that should cover it all. For examples, look at existing smiley packs. If you have created a new smiley pack, ping me and I will add a link in this post.