forrestguice / SuntimesWidget

Android app (and widget collection) that displays sunlight and moonlight times.
GNU General Public License v3.0
319 stars 59 forks source link

Sunset/Sunrise widget does not updates automatically #806

Open DarthMazut opened 3 weeks ago

DarthMazut commented 3 weeks ago

Describe the bug Sunset/Sunrise widget does not update automatically. I need to click it in order to display up-to-date values (I've set to update widget on click).

To Reproduce Steps to reproduce the behavior:

  1. Create widget with Sunset/Sunrise
  2. Go to sleep...
  3. Look at the widget in the morning: it displays yesterday's values

Expected behavior The widget should display proper values at real time. Like no one expects that a clock requires click on its widget to display correct time...

Screenshots

Version Info:

My question regarding this is whether this affects sunset/sunrise notifications time?

forrestguice commented 3 weeks ago

Thanks for the report.

I think this is caused by aggressive battery optimization by your specific device. Unfortunately Xiaomi devices have a reputation for this. It might be possible to fix it by following these recommendations, or one of the solutions at https://dontkillmyapp.com/.

My question regarding this is whether this affects sunset/sunrise notifications time?

Very likely. If widgets fail to update, I'm also betting that alarms/notifications fail too (since both rely on the same underlying AlarmManager).