cvzi / darkmodewallpaper

🌓 A live wallpaper for Android that respects dark theme mode 🌇
https://f-droid.org/packages/com.github.cvzi.darkmodewallpaper/
GNU General Public License v3.0
144 stars 11 forks source link

Feature Request: Animated GIF wallpaper support #113

Closed d3nwah closed 1 year ago

d3nwah commented 1 year ago

Hello :)

As it is in the current F-Droid "1.4.11 (43)" release, you can load a GIF image as a wallpaper, but sadly it doesn't animate. Is it easy to implement? If it's viable I would like to request it :slightly_smiling_face:

Br

cvzi commented 1 year ago

I am not sure if it is possible, the app might be too slow for a smooth animation. I will check when I have some time.

cvzi commented 1 year ago

I did a quick test and it seems to work smoothly on my phone.

Did you already have specific GIF wallpapers in mind? If so, could you upload them here or send them to me (cuzi-android@openmail.cc)? I would try to create a test .apk with the GIFs included. That way you could also test if it works on your phone.

The whole graphical interface of the app is currently made for handling static images (i.e. bitmaps), so it will be a lot of work to add support for selecting a GIF from the gallery. I don't want to do that before I am sure it really works smoothly. Adding the GIF directly to the .apk for testing should be quick and easy.

d3nwah commented 1 year ago

Of course! The image I use as wallpaper is this lovely pixel art found on web

09ef55d913c4e979603e468d17e8730a

Thank you for considering implementing the feature

cvzi commented 1 year ago

You can download the apk from here: https://github.com/cvzi/darkmodewallpaper/releases/download/v1.4.13/gif-debug-1.apk (13.2 MB)

The little previews are not animated, but when you apply the live wallpaper it should be animated.

d3nwah commented 1 year ago

Animates like a charm in home screen.

Additional feedback:

cvzi commented 1 year ago

Thanks for the details. I will add it properly then

cvzi commented 1 year ago

Here's another version for testing: https://github.com/cvzi/darkmodewallpaper/releases/download/v1.4.13/gif-debug-2.apk

It allows to select .gif animations (or .webp) from the gallery. Your first point should also be fixed.

d3nwah commented 1 year ago

Frankly, it seems to have fixed all the issues I mentioned

cvzi commented 1 year ago

That's good 😂 I did improve the performance a little bit compared to the first version. Still, I was able to reproduce the stuttering after unlock on my phone a few times as well, especially with big GIF files. But I don't see a way to improve that further.

I wonder how it affects battery life though, but that's hard to measure. And I never used a animated wallpaper before, so I don't know how they usually affect battery life.

d3nwah commented 1 year ago

I've been wondering about the battery too. I don't have any tools to measure that, sadly. Doesn't seem to have a major impact on the battery so far

cvzi commented 1 year ago

It is now released in the normal version on F-Droid and Google Play.

I looked at the battery usage over 48h on my phone: In the debug version, with your GIF on home-screen and another GIF on the lock-screen. The app now appears in my Android settings in the battery usage list. It is listed as 1% Used for 6 hours. With static images it never even appeared in the list. So definitely uses more battery, but still seems acceptable.