Blog

Why Do Android Widgets Only Update Every 30 Minutes? (And How Clock Widgets Get Around It)

Android widgets update every 30 minutes at most when they rely on the standard refresh mechanism, because the system enforces a 30-minute minimum on the interval an app can request. Anything that updates faster, such as a clock widget, is either using special text views the launcher updates itself, or scheduling its own alarms, and both approaches have limits the system tightens on every release.

If you have ever wondered why a weather widget shows a temperature from an hour ago, or why a counter widget moves in jumps while the same counter inside the app is smooth, this is the explanation.

What a widget is, mechanically

A home-screen widget is not part of the app. It is a small description of a layout that the app hands to your launcher, which then draws it. The app is not running while you look at the widget. To change what the widget shows, the app has to be woken up, build a new layout, and hand it over again.

That hand-off is the expensive part, and it is why Android rations it.

The 30-minute floor

Every widget declares an update period in its configuration. The documentation is clear that values below 30 minutes are ignored and rounded up to 30. So even if the developer asks for one minute, the standard mechanism delivers a refresh at most twice an hour, and the system is allowed to delay it further.

Developers who want faster updates set the period to zero and take over scheduling themselves. There are two common ways.

Scheduled background work

Android’s WorkManager runs periodic jobs, but the shortest allowed period is 15 minutes. That is better than 30 but still useless for anything that wants to change by the minute.

Alarms

The AlarmManager can fire at any interval in principle. In practice, since Android 6 the system’s Doze mode batches and delays alarms while the phone is idle, and since Android 12 exact alarms require a permission the user has to grant. A widget that sets an alarm every minute will work while you are actively using the phone and will drift or stall when you are not. That is the “widget frozen after the screen was off for an hour” symptom people describe on forums.

How clock widgets tick every minute anyway

Clock widgets look like they break the rule. They do not. Android lets a widget include two special views that the launcher updates on its own, without waking the app:

These are updated by the launcher process, which is already running and already drawing the home screen, so there is nothing to wake up. Any clock widget that shows the time of day without the app running is using TextClock. Any stopwatch-style widget that visibly ticks seconds is using Chronometer.

The catch is that these views are limited. TextClock can only show the current time and date. Chronometer can only show elapsed time in hours, minutes and seconds. Neither can show an arbitrary calculated value such as a percentage, a temperature, or a decimal age. If the number you want has to be computed, the app has to be woken up to compute it, and you are back to the scheduling limits above.

Why some widgets still seem fine

A few things make the limits less visible than they sound:

So a widget can look responsive most of the time and still be limited to one real update per half hour when the phone is idle.

Why seconds in a widget are a compromise

Put the two constraints together. A widget can tick seconds only if the number is a plain elapsed time from a fixed moment. It can show a computed value only if the app is periodically woken, which the system throttles. A decimal age is a computed value, so an age widget has to choose a precision at which the throttling does not matter.

At two decimal places a year, the last digit changes about every three and a half days, so a refresh every half hour is more than enough. At seven decimals the last digit changes every few seconds, and the widget will be visibly stepping rather than flowing whenever the system delays an update. Beyond seven, a widget cannot keep up at all.

What to do when a widget is stuck

The widget guide has the full fix list. The short version is: open the app once, set the app to Unrestricted battery use (Settings, Apps, the app, App battery usage on Pixel; Settings, Battery, Background usage limits on Samsung), and restart the phone if it has been up for a long time.

Where a live wallpaper fits

A live wallpaper does not have this problem, because it is not a hand-off. It is a running drawing surface that the system tells to pause when invisible and resume when visible, and while visible it can redraw as often as the display refreshes. That is why TimeBorn offers up to 7 decimal places in its widget and up to 10 in its wallpaper: the widget is bound by the update rules above, and the wallpaper is not. If you want the last digits to move, the wallpaper is the tool, and the precision guide explains how fast each digit moves at each setting.

More from the blog

All posts