Sticker Message Module
There are two ways to add extra sticker packs. Using a plist
configuration file or programmatically. The following image formats are supported: png
,gif
.
Plist
Create a new plist
file with the following format:
[
{
icon: "pack-icon.png",
stickers: [
"sticker1.png",
"sticker2.png",
...
]
}, ...
]
Then tell the app to use your plist
file:
ChatSDK.builder()
...
.build()
...
.addModule(StickerMessageModule.builder()
.setLoadStickersFromPlist(R.raw.stickers_plist)
.build())
...
The bundle should be where both plist
file and the stickers are located.
Programatically
Stickers can also be added programmatically.
StickerPack pack = new StickerPack(R.drawable.icon);
pack.addSticker(R.drawable.sticker_1, "sticker_1.png");
pack.addSticker(R.drawable.sticker_2, "sticker_2.png");
StickerMessageModule module = StickerMessageModule.builder()
.setLoadStickersFromPlist(false)
.build();
module.addPack(pack);
ChatSDK.builder()
...
.build()
...
.addModule(module)
...
Last updated
Was this helpful?