Which value is of higher precedence, updatePeriodMillis or the value associated with the Alarm?

Both of them will trigger an onUpdate() call.

If you set an alarm at 20 minutes and your updatePeriodMillis to 30 minutes.

Then u place your widget on the home screen. After 20 minutes, the alarm will trigger an onUpdate to be called (can be any other function of your choosing actually). Then 10 minutes later (in total, 30 mins since widget placed on screen), updatePeriodMillis will trigger an onUpdate(). Then 10 minutes later (40mins since widget placed on screen), the alarm will trigger another onUpdate(). And finally 20 minutes later (60mins since widget placed on screen) updatePeriodMillis will trigger another onUpdate().


From android DOC: Note: Updates requested with updatePeriodMillis will not be delivered more than once every 30 minutes. [enter link description here][1] http://developer.android.com/reference/android/appwidget/AppWidgetProviderInfo.html#updatePeriodMillis

so basically if you set updatePeriodMillis to less than 1800000, android wouldn't call your onUpdate method until 30min passeed