I have an animated webp file that I took from the original AR Stickers APK which I'd like to show in my app for onboarding in ARCore. It looks like I can easily load the first frame of the webp file into an imageview but trying to decode it as a Movie object fails. Is there a simple way of showing it? It's obviously possible since the AR-Stickers app clearly did it in their original release. I saw that there's a library from Facebook (Fresco) that seems like it should be able to do it but from what I understand it adds quite a bit of bloat to my app's APK. Are there any simple solutions to this?
That's true. There aren't many animated WebP/GIF solutions out there, and Fresco takes a lot.
There is this library (made an easier fork of it here ), but it can have some serious issues with files sometimes, such as here . If you know why this occurs, and how to fix it, please consider contributing to it (or to my fork).
There is, of course, a way to use the normal Android framework for loading animation files (sample here) using ImageDecoder&AnimatedImageDrawable , but it's only from Android P.
Google has promised it will be added to the support library (here), but I still don't see it.
That's why I've created a question here, where I wanted to know how to fetch frame-by-frame image of an animated WebP file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With