Giter Club home page Giter Club logo

Comments (2)

forrestguice avatar forrestguice commented on July 19, 2024

Does the widget ever recover? Like suppose you wait a minute or two, does it eventually update? If not, does resizing the widget (smaller or larger and back again) cause the widget to recover?

The update mechanism is similar (but not exactly the same) as that used by Suntimes. It may be worth observing the world map or clock widget to see if it behaves the same. It's unlikely there's a conflict, but it is fragile. I broke it a few commits ago while adding additional widget sizes (5x3) and only discovered it just now.

If you have access to the device's logcat there are debug lines (or lack thereof) that might give some clues. Every time the widget updates it should look something like.

onReceive: suntimes.naturalhour.WIDGET_UPDATE(42)
D/NaturalHourWidget_5x3: updateViews: 42
D/NaturalHourWidget: saveNextSuggestedUpdate: 9:25 AM
D/NaturalHourWidget_5x3: getUpdateTimeMillis: next update is at: 1602433501041
D/NaturalHourWidget_5x3: setUpdateAlarm: 9:25 AM --> suntimes.naturalhour.WIDGET_UPDATE(42) :: 0

It should happen once a minute, but if something should prevent it, the next update doesn't get scheduled. Android should eventually go to refresh the widgets on its own though, which should schedule another update (and cause it to recover). Android likes to batch updates together (delay them up to 15min) and other annoying behaviors to save battery. Its worth trying to add the app to the battery optimization exception list. The way it should work is if a scheduled update is missed (because the device is sleeping), it should be triggered immediately upon waking up. It doesn't sound like that's happening.

from naturalhour.

XanderLeaDaren avatar XanderLeaDaren commented on July 19, 2024

Well, it’s been three days the issue hasn’t appeared any more, so I would close this for now and I shall let you know if anything goes wrong again. 🤨

from naturalhour.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.