How can a user choose the update frequency of a widget.
if i have 3 radiobuttons in activity module with say 6hr ,12hr and 24hr. When user selects the radiobutton how can i pass the value to ConfigureHomeWidget in service module.
Save the settings in a file and read them in Service_Create. In this case you can schedule the widget to update every 6 hours and skip some of the updates base on the user settings.
Another option is to manually manage the updates by using ServiceStartAt. This is a bit more complicated.
I tried to set the UpdateIntervalMinutes parameter of ConfigureHomeWidget with a variable declared as Int. But during compilation I got the error "An integer constant is expected". So this value cannot be changed at runtime?
Can u please show with an example how to use StartServiceAt to update widget. i tried using timer. it works fine for very short peroid of time but not for longer period. i want user to choose from options 6, 12, 24 hr. if user selects 6 it should update every 6 hrs. if 12 selected it should change from 6 to update every 12hr.
In this case it will be simpler to set the update widget to 6 hours and then check in your code whether 6, 12 or 24 hours passed and update the widget.