Pomodoro Timer That Runs in the Background on Android: Why Timers Die and How to Keep One Reliable

You start a 25-minute session, lock the phone, and get to work. Forty minutes later you check — the timer says 17:42, frozen, and nothing ever rang. Reviews of focus timer apps are full of this: "stops when the screen is off", "no sound when timer ends", "had to keep the app open". It's not you, and it's usually not even the app's logic. It's how Android manages battery. This guide explains what is going on and how to make a pomodoro timer that actually keeps running.

Why Android kills background timers

Android assumes that anything running while the screen is off is wasting battery unless it proves otherwise. Three layers work against a naive timer:

A timer that only updates a number on the screen works fine — until the screen goes off. That's the whole problem.

What a reliable timer app does differently

  1. It runs as a foreground service with a visible notification. Android will not kill a service that shows the user a persistent notification. This is the single most important design decision. The side effect is a feature: the remaining time is right there in the notification shade, with a pause button, so you never need to unlock the phone to see it.
  2. It stores an end timestamp, not a counter. A good timer remembers "this session ends at 14:32:10" rather than "17 minutes left" and recomputes from the clock. Even if the process is briefly paused, the time is still correct when it resumes.
  3. It schedules an exact alarm for the finish. The end-of-session sound is fired by an exact alarm that is allowed to wake the device, not by the countdown loop. That's what fixes "no sound when the timer ends".
  4. It survives a screen-off finish. Sound plus vibration, so a face-down phone on a desk still gets your attention.

Pebble Focus is built this way: the running session lives in a foreground notification with remaining time and a pause button, the end is an exact alarm, and completion plays a sound and vibrates with the screen off. Earlier versions did have a silent-finish bug on some phones, and that is exactly the bug the alarm-based finish fixed.

5-minute setup checklist for any timer app

  1. Allow notifications. On Android 13+ the app has to ask. If you declined, go to Settings → Apps → the timer app → Notifications and turn them on. Without this, a foreground timer cannot show its notification and is much easier to kill.
  2. Set battery to "Unrestricted". Settings → Apps → the app → Battery → Unrestricted (stock Android). On Samsung: Settings → Battery → Background usage limits → make sure the app is not in "Sleeping apps" or "Deep sleeping apps". On Xiaomi: App info → Battery saver → No restrictions, and enable Autostart.
  3. Allow "Alarms & reminders" if the app asks (Android 12+). This is the permission for exact alarms — the thing that rings on time.
  4. Don't swipe it away from Recents on phones that treat that as "force stop" (many Xiaomi and Huawei devices do). Lock the app in Recents if your phone offers that.
  5. Test once with the screen off. Start a 1-minute session, lock the phone, wait. If it rings, you're done. If not, revisit step 2 — it's almost always battery optimization.

Use the widget so you stop opening the app

Once the timer is reliable, the next friction is the app itself. A home screen widget that shows the current state and lets you start or pause a session removes the last excuse: you glance at the home screen, tap once, and lock the phone. Pebble Focus ships a start/pause widget for exactly this, and the notification handles the rest while the screen is off.

What about keeping the screen on?

Some people prefer a timer that stays visible on the desk like a kitchen timer. That's a valid setup — a "keep screen on" option while the timer runs, dark theme to save the display. Just know it's a preference, not a workaround. With a foreground notification and an exact alarm, the timer is equally reliable with the screen off.

Quick answers

Why does my pomodoro timer stop when I lock the phone? Doze mode or battery optimization froze the app. Use a timer with a persistent notification and set its battery mode to Unrestricted.

Why was there no sound when the timer ended? The finish was scheduled by an inexact timer that got deferred. Use an app that fires an exact alarm and check that notifications and "Alarms & reminders" are allowed.

Does a background timer drain battery? A foreground service that just waits for an alarm uses almost nothing. The music moods (rain, fireside, ocean) use more, roughly like any audio app; turn them off if you are on a low battery.

Get Pebble Focus — a pomodoro timer that keeps running in the background