Skip to content

fix(widget): standardize alarm interval to 10 minutes and document updatePeriodMillis limitation#20481

Closed
MandeepT19 wants to merge 1 commit intoankidroid:mainfrom
MandeepT19:fix/widget-alarm-interval
Closed

fix(widget): standardize alarm interval to 10 minutes and document updatePeriodMillis limitation#20481
MandeepT19 wants to merge 1 commit intoankidroid:mainfrom
MandeepT19:fix/widget-alarm-interval

Conversation

@MandeepT19
Copy link
Contributor

@MandeepT19 MandeepT19 commented Mar 15, 2026

Problem: In widget_provider_deck_picker.xml line 11, a TODO comment suggests using updatePeriodMillis for simpler updates. However the actual implementation in WidgetAlarm.kt runs every 1 minute, contradicting the TODO's intended 10 minute interval.

Investigation: Research into updatePeriodMillis revealed a minimum enforced value of 30 minutes by Android. For a widget displaying due card counts, a 30-minute update interval is too infrequent — users glance at the home screen throughout the day and need accurate card counts. Additionally, the current 1-minute interval causes unnecessary battery drain. Standardizing to 10 minutes aligns with the original TODO intent while balancing accuracy and battery efficiency.

Fix: Updated WidgetAlarm.kt — changed interval from 1 minute to 10 minutes at 2 occurrences. Updated TODO comment in widget_provider_deck_picker.xml and widget_provider_card_analysis.xml with explanation of why updatePeriodMillis was not used.

Testing: The build was successfully running and there were no errors found after doing the change in the code

Addresses TODO comment in widget_provider_deck_picker.xml line 11

@david-allison
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants