android widget update period milles not working

The updatePeriodMillis attribute defines how often the App Widget framework should request an update from the AppWidgetProvider by calling the onUpdate() callback method. The actual update is not guaranteed to occur exactly on time with this value and we suggest updating as infrequently as possible—perhaps no more than once an hour to conserve the battery.

If, you need to update more frequently (i.e 1 second in your case, which is not at all recommended). To do so, set an alarm with an Intent that your AppWidgetProvider receives, using the AlarmManager. Set the alarm type to either ELAPSED_REALTIME or RTC, which will only deliver the alarm when the device is awake. Then set updatePeriodMillis to zero ("0").


The update time for widgets is forced to at least 30mins, to avoid poor programmed widgets to dry battery. Use AlarmManager to overcome this (see this post).