How can I play APNG files in android

farhad.kargaran picture farhad.kargaran · Jul 18, 2016 · Viewed 7.4k times · Source

I want to play APNG files and create animated stickers in my app like LINE messenger! I can create apng using some tools like APNG Assembler. but I dont know how to play animated png in my app.

help me please!

Answer

oupson picture oupson · Oct 24, 2018

If you want to display or create apng files you could use this : https://github.com/oupson/Kapng-Android

Example of loading apng file into imageView :

ApngDecoder.decodeApngAsyncInto(context, URL("https://apng.onevcat.com/assets/elephant.png"), imageView)