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
143 stars 11 forks source link

Incorrect image shown in recents menu #185

Open Einlion opened 2 months ago

Einlion commented 2 months ago

Screenshot_20240501-203056

The wallpaper shown in recents screen is not the wallpaper being picked, instead its a default icon. I am on Android 14 but this was present in 13 as well. I have tested applying other live wallpapers and they seem to work fine.

Thanks.

cvzi commented 1 month ago

I can't solve this anytime soon.

I don't have Android 13/14 on my phone. I tried to test it with Android emulator, but the Google Pixel that are available on the emulator don't show the wallpaper in the recent screens at all, they only show a solid color.

cvzi commented 1 month ago

Other live wallpapers are shown in the recent menu in a blurred way or normal?

And what phone do you have?

Einlion commented 1 month ago

They are shown in a blurred way. I have moto edge 30 ultra, Android 14 There's a chance this might be a moto launcher gotcha but I don't have a good idea on how live wallpapers work.

cvzi commented 1 month ago

Thanks. I'll take another look.

It is probably the Moto launcher that offers this feature of showing the wallpaper. I know the Moto Launcher customized the "recents screen" on Android 10 and this couldn't even be disabled, because it's part of the system. Even if you installed a third-party launcher, the Moto launcher was still handling the "recents screen" itself. Likely the same applies to Android 14.

Einlion commented 4 days ago

Hi, I believe the launcher is somehow using https://github.com/cvzi/darkmodewallpaper/blob/main/app/src/main/res/xml/wallpaper_info.xml#L25 as bg, tho i have no way to test and when im trying to generate local debug build it keeps failing.

cvzi commented 4 days ago

I have updated the repository, now the apk files are created in the Github actions. For example this is the last run: https://github.com/cvzi/darkmodewallpaper/actions/runs/9748487167 At the bottom you can download the apk files.

I believe if you enable Github actions in your cloned repository here and update the Github action file to the version that I just created gradleCI.yml, then your repository should also generate the apk files, if you push a change.

See https://github.com/Einlion/live-wall-test/commit/721eb0f3ccfe1de25a0a4506b52cf63104fa3a82#r143729428 for why your build is failing.

Einlion commented 4 days ago

Thanks for the quick response! I tried the new version after those changes, looks file it's fixed now, I get a transparentish background as expected. I do not have full idea as to what that parameter actually is for and if changing it to transparent would cause any issue in hindsight.

cvzi commented 3 days ago

Any app can just request this thumbnail to use it, but the only use-case I know is the wallpaper selector. The thumbnail usually appears in the list of installed live wallpapers in the wallpaper selector. Could be bug that moto launcher uses the thumbnail. Or maybe this app doesn't correctly deliver the actual wallpaper and the moto launcher uses the thumbnail as a "fallback" solution.

I wonder if it also works if you just remove the thumbnail. Could you test it without it, like this:

<wallpaper xmlns:android="http://schemas.android.com/apk/res/android"
    android:description="@string/wallpaper_description"
    android:settingsActivity="com.github.cvzi.darkmodewallpaper.activity.MainActivity"
    android:showMetadataInPreview="true"
    android:supportsMultipleDisplays="true" />

Maybe also change the application id again to prevent any caching of the thumbnail

Edit:

I've checked a few other open source live wallpapers, and they all seem to use this thumbnail the same way as I did. So at least that seems to be correct.

Removing the thumbnail completely vs. a transparent thumbnail seems to make a difference for some phone manufacturers: If there is no thumbnail, the wallpaper selector will show the app icon instead (which is the same icon as the thumbnail in our case). However this is not true for all phones, the Pixel wallpaper selector doesn't show the app icon, it shows a blank space i.e. there is no difference between no-thumbnail and transparent-thumbnail.