Comments (7)
Hi. Thanks for reporting there's a problem. Its possible there is a bug here (wouldn't be the first time), or it could be an issue with your specific device.
The widget is supposed to update once a minute. If you are able to access your devices logcat, there should be a message every time the widget is (re)scheduled. Something like..
05-10 07:47:01.829 6421-6421/com.forrestguice.suntimes.naturalhour D/NaturalHourWidget: saveNextSuggestedUpdate: 7:48 AM
05-10 07:47:01.829 6421-6421/com.forrestguice.suntimes.naturalhour D/NaturalHourWidget_3x2: getUpdateTimeMillis: next update is at: 1652194081591
A few questions.. 1) What version Android are you running? (different behaviors for each). 2) When you notice the widget hasn't been updated, how stale is the info? Is it 10-15 minutes out of date, or hours, or maybe back to when the widget was added (never updated)? 3) Do you experience this bug when using the Suntimes widgets? (very similar code).
I can think of a few reasons the widget may not be updating. Supposing the app was ever force closed, the updates are stopped too. Its also possible the updates are scheduled but the OS is batching them to save battery - the widget would update every 15 to 20 minutes instead. Some phones are worse than others (https://dontkillmyapp.com/), but disabling battery optimization for the app would fix the widget.
from naturalhour.
All of the widgets schedule their updates the same way (by registering a PendingIntent
with AlarmManager
), so anything that disrupts that API effectively kills the widgets. So the potential reasons for a stale widget are numerous :\
from naturalhour.
I'm running android 9.
the widget is stuck at the last update (the last time I resized it)
I have not tried it yet with suntimes widjet.
"but disabling battery optimization for the app would fix the widget." it was enable...
from naturalhour.
@Dambond Thanks for the information. I'll keep this on the list. Whatever is causing the issue, once a widget fails once, it also fails to schedule future updates (breaking a chain). So there might be something more that can be done to help stale widgets recover.
Opening Suntimes -> Settings -> Widgets
should trigger all widgets (including NaturalHour), restoring future updates. Afterward, I'm guessing the widget will update normally for some period, before whatever is causing the problem stops it again.
"but disabling battery optimization for the app would fix the widget." it was enable...
imho the Android battery optimization UI is confusing. All apps start on the "optimized" list (enabled), so you must scroll through a list of all apps, and then find and whitelist the specific app you want to "disable". In this context "enabled" actually means the system might stop the app at any time to save battery (but what actually happens really depends on the specific device).
from naturalhour.
I'm here with good news, it work now!
Sorry for not thinking about optimization.
Thank for your time!
from naturalhour.
I'm here with good news, it work now!
Sorry for not thinking about optimization.
Thank for your time!
Hum... I was wrong problem is back
from naturalhour.
Yeah, I figured it might be too soon to celebrate.
I think there might be an easy fix though, which I'll include in the next patch.
An unsigned debug build is available if you wanted to try it before then. From the green check mark next to the referenced commit click 'details', then 'summary' (left pane), then 'app' (under 'Artifacts').
from naturalhour.
Related Issues (19)
- RFE: Day Hours begin HOT 5
- Documentation HOT 5
- Broken UI - Missing first hour - Watches HOT 3
- DST Discussion - bug HOT 6
- false Apparent Solar Time timezone HOT 1
- Wear OS watch face HOT 1
- RFE: Start of Day options HOT 1
- unable to set alarm for all hours when using "sunset (24)"
- watch face show broken daylight HOT 3
- Solar midnight
- Feature request: Android screensaver support
- Wigdet hangs HOT 2
- Widget aspect HOT 1
- General thoughts on the clockface HOT 4
- Testing the .apk - unable to install HOT 4
- Feature: adding an alarm HOT 7
- Feature: “horizontal” one-hour widget HOT 1
- Suggestion: colors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from naturalhour.