Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Widget refresh problem #70

Open
dasbiswajit opened this issue Oct 2, 2017 · 5 comments
Open

Widget refresh problem #70

dasbiswajit opened this issue Oct 2, 2017 · 5 comments
Labels

Comments

@dasbiswajit
Copy link
Contributor

The weather temperature in Widget does not auto refresh. Every time the Widget has to be tapped to open the app only when the temperature gets refreshed. Please help to resolve the issue.

@dasbiswajit
Copy link
Contributor Author

@arminha can you look into this issue. Its a minor fix maybe.

@arminha arminha added the bug label Dec 8, 2017
@arminha
Copy link
Owner

arminha commented Dec 8, 2017

I was not able to find the cause of this.
I think the UpdateWeatherService is not scheduled properly, but can't figure out why. This needs some more debugging

@dasbiswajit
Copy link
Contributor Author

Any pointer. I suspect sendWidgetRefresh() method in UpdateWeatherService.java

@arminha
Copy link
Owner

arminha commented Dec 9, 2017

I would first check if onHandleIntent() on the UpdateWeatherService is executed at all.

The UpdateWeatherService should be called by the Android AlarmManager about every hour (not exactly, see AlarmManager.setInexactRepeating).
The UpdateWeatherService is registered with the AlarmManager in AbstractWeatherWidgetProvider.

Sometimes when I encountered a widget update problems before, removing and adding the widget fixed it. This would execute the code above and register the UpdateWeatherService properly again.

@dasbiswajit
Copy link
Contributor Author

Only adding widget is executing the alarmmanager only once. Else not. On handleintent () really not effective. It's only working when we hit the update button. But alarmmanager is not at all working.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants