Paperize icon indicating copy to clipboard operation
Paperize copied to clipboard

[Bug] Wallpaper Change Time not consistent

Open Wrakor opened this issue 2 years ago • 35 comments

Describe the bug Following up on this enhancement.

There's something weird going on, the wallpaper is changing more often than it should. I've set it to change at 9AM every day, but it ends up changing randomly during the day (usually just once or twice).

To Reproduce Steps to reproduce the behavior:

  1. Set time interval to 1 day, and set a specific hour.
  2. See how the wallpaper will change more than that set time.

Expected behavior The wallpaper should only change at the set time.

Screenshots Here are some examples where I've noticed the wallpaper change when it shouldn't, as you can see on the "Last change" time (I didn't manually cause an image change).

Sometimes even the next change time gets messed and I have to set the time again (even though it's supposedly already at 9AM):

Smartphone (please complete the following information):

  • Device: Pixel 9 Pro XL
  • OS: Android 15 App version: v2.3.0

Wrakor avatar Oct 19 '24 12:10 Wrakor

Just as a heads up, I am looking into this. I'm not really sure why this is happening and it's very irregularly reproducible for me, so it might take me a bit.

Anthonyy232 avatar Oct 20 '24 07:10 Anthonyy232

Just as a heads up, I am looking into this. I'm not really sure why this is happening and it's very irregularly reproducible for me, so it might take me a bit.

Sure, appreciate it 👍

Wrakor avatar Oct 20 '24 12:10 Wrakor

Okay so for the first two sets of pictures, I was not able to replicate it. However, I noticed that the last set time is slightly before the time of the screenshot (shown in the status bar). Maybe there is some confusion here, when you set the album, it first changes the wallpaper a first time, and then the next one would be whatever you set it to be.

So for example, the time is 12:00 AM, my interval is three hours, and I choose the starting time to be 6:00 AM. Then, when you enable the wallpaper changer/select an album, last set time is set to 12:00 AM, and the next set time is set to 6:00 AM. After it triggers at 6:00 AM, the next instance would be 9:00 AM.

For the second set of pictures, I have confirmed that there is a bug -- purely a visual one in the calculating logic. The next set time and the actual time the wallpaper changes did not line up with each other. I have fixed it and just testing it on my device for a couple days to make sure I don't notice any weird behavior.

Anthonyy232 avatar Oct 24 '24 18:10 Anthonyy232

For the second set of pictures, I have confirmed that there is a bug -- purely a visual one in the calculating logic. The next set time and the actual time the wallpaper changes did not line up with each other. I have fixed it and just testing it on my device for a couple days to make sure I don't notice any weird behavior.

It doesn't seem to be a visual bug.

Today, it showed that the next change would be at 12:02:

And it did in fact change:

While also updating the next time to 12:07. Note that the supposed time of change is 9:30.

Does the app need an internet connection for the wallpaper to refresh?

Wrakor avatar Nov 02 '24 01:11 Wrakor

Guess I'm wrong haha. I'll keep looking into that. I wonder if somehow exact alarms aren't being exact now -- might be an SDK 35 thing. Sorry for the lack of updates, been busy with school

edit* no, the app never connects to the internet

Anthonyy232 avatar Nov 02 '24 01:11 Anthonyy232

Np 🙂 I've tried changing the background usage permission of the app from Optimized to Unrestricted, will see if it helps.

Wrakor avatar Nov 02 '24 01:11 Wrakor

Sure, let me know! Are you also able to test if smaller intervals also encounter this problem, or just the 1 day interval? Also if the issue occurs if there is no starting time set.

Anthonyy232 avatar Nov 02 '24 23:11 Anthonyy232

Changing the background usage setting didn't prevent the issue, unfortunately.

I've turned on notifications to detect these changes better, and sure enough today I got one at 17:07, even though the next time should be only tomorrow.

Screenshot_20241102-170754

My guess would be that the defined time is being overriden by the current time when I'm setting the time I want, or something like that.

Sure, let me know! Are you also able to test if smaller intervals also encounter this problem, or just the 1 day interval? Also if the issue occurs if there is no starting time set.

I can try reseting the change time, and see if it persists.

Wrakor avatar Nov 02 '24 23:11 Wrakor

Well the thing is that the changing starting time should only affect the first scheduled wallpaper change -- and then subsequent ones are just based on current time. For example if my interval is 1 hour and my starting time is 9 AM. Then the first alarm is set for 9 AM, and then anything afterwards is simply current + interval, so 9 AM + 1 hr, 10 AM + 1 hr... at least in theory...

I'll keep testing :)

Anthonyy232 avatar Nov 03 '24 00:11 Anthonyy232

If it doesn't work, let me know, it would be awesome if you could test an update for me to see if that fixes things at all

Anthonyy232 avatar Nov 03 '24 18:11 Anthonyy232

Ok, I might have found what's causing the issue.

Today I got a notification informing me of the next change:

Screenshot_20241103-220732

And right after receiving that notification, the wallpaper changed:

Notice the device's clock, it's 22:07, and the notification was received 17 minutes ago, which matches the time you see on the image: 21:49.

This means the "warning" about the next wallpaper change is triggering a change itself.

(Btw, this happened even without having a custom change time)

If it doesn't work, let me know, it would be awesome if you could test an update for me to see if that fixes things at all

Yeah, sure, I could test it 👍

Wrakor avatar Nov 03 '24 22:11 Wrakor

Just to add that this issue doesn't happen with a 12 hour interval, even with a custom time.

Wrakor avatar Nov 05 '24 23:11 Wrakor

Interesting -- currently doing some app refactoring as I'm not really happy with performance but I'll examine why it occurs for 24 hrs. If you have free time, let me know about other intervals, both shorter and longer if possible 😀

Anthonyy232 avatar Nov 06 '24 00:11 Anthonyy232

I'm now testing 23 hours, will report tomorrow. Something that I noticed is that you can set the interval to either 1 day or 24 hours (1st slider or 2nd slider) - seems a bit redundant, maybe the interval hour slider should only go up to 23? 🤓

Wrakor avatar Nov 06 '24 22:11 Wrakor

The issue continues to happen, I've also tried with 16 hours.

The notification that warns about the next planned change keeps triggering a change, that's been recurrent in my testing.

And sometimes it also changes outside that, unexpectedly. I'm guessing the change triggered by the notifications messes up the timings internally.

Oh, well, hoping you can fix this.

Wrakor avatar Nov 08 '24 18:11 Wrakor

I'm in the process of refactoring a large chunk of the app and hopefully that will fix this as a side effect, if not, I'll keep at it :D

Anthonyy232 avatar Nov 11 '24 19:11 Anthonyy232

Hey, would you be willing to check out a test build to see if there are any bugs regarding this nature (or anything else)?

Anthonyy232 avatar Feb 26 '25 19:02 Anthonyy232

Hey, would you be willing to check out a test build to see if there are any bugs regarding this nature (or anything else)?

Hey, sure 👍

Wrakor avatar Feb 27 '25 23:02 Wrakor

Thanks! Let me know of any bugs. https://drive.google.com/file/d/1-8BJGw9rSx7iYzPuBL3-P98JjB0XZwJn/view?usp=sharing

Anthonyy232 avatar Mar 07 '25 20:03 Anthonyy232

It seems that it has the same (or similar issues).

I have set an interval of 15 hours for a change of wallpaper. When I turned off my Airplane Mode this morning, the wallpaper changed. And when I restarted the phone it changed again. It should've only changed later:

If you're using Workers, maybe its logic needs to be reviewed - like, is it needing an internet connection? What is exactly is triggering these ahead of schedule changes?

Wrakor avatar Mar 08 '25 11:03 Wrakor