worldclockwidget icon indicating copy to clipboard operation
worldclockwidget copied to clipboard

Widget refresh problem

Open dasbiswajit opened this issue 8 years ago • 5 comments

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 avatar Oct 02 '17 15:10 dasbiswajit

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

dasbiswajit avatar Oct 11 '17 20:10 dasbiswajit

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

arminha avatar Dec 08 '17 19:12 arminha

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

dasbiswajit avatar Dec 09 '17 07:12 dasbiswajit

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.

arminha avatar Dec 09 '17 13:12 arminha

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.

dasbiswajit avatar Jan 27 '18 05:01 dasbiswajit