Device Features· 5 min read

Background Tasks in React Native: What Actually Runs

What really runs in the background in React Native apps in 2026: iOS and Android limits, expo-background-task, location and BLE tasks, silent push.

By

Full-Stack, Mobile & AI Engineer

"Can the app sync every five minutes in the background?" is one of the most common requests in mobile projects, and on iOS the honest answer is no. Operating systems protect battery and privacy aggressively, and they decide when background work runs, not your app. Teams that design around that reality ship reliable features; teams that fight it ship features that work on the developer's phone and nowhere else.

This guide explains React Native background tasks as they actually behave in 2026: the limits on iOS and Android, what expo-background-task does, the special cases (location, Bluetooth, audio) that do run continuously, and how to use silent push to trigger work from your server.

Key takeaways

  • Periodic background work is opportunistic. iOS schedules it when it decides; Android's WorkManager respects a minimum interval of 15 minutes and battery rules.
  • expo-background-task (since Expo SDK 53) uses BGTaskScheduler on iOS and WorkManager on Android, replacing expo-background-fetch. Its minimumInterval is in minutes.
  • Continuous background work is only for specific purposes: location, audio playback, VoIP, Bluetooth accessories and similar, each with permissions and review scrutiny.
  • Silent push notifications let your server wake the app to fetch data, but delivery isn't guaranteed and is throttled.
  • Design for "eventually": sync on app open and reconnect, and treat background runs as a bonus.

What iOS allows

On iOS, apps are suspended shortly after leaving the foreground. Background execution happens in a few ways:

MechanismWhat it's forControl you have
BGTaskScheduler (app refresh, processing)Periodic refresh and longer maintenance tasksYou request; iOS decides when, based on usage, battery and network
Background modesLocation, audio, VoIP, Bluetooth central, external accessoriesContinuous, but only for that purpose, declared and justified
Silent (background) pushServer tells the app new content existsThrottled by iOS; not guaranteed
Finishing a taskA short extension when the app goes to the backgroundSeconds to minutes, not indefinite

iOS learns from how often users open your app. An app opened daily gets more background refresh opportunities than one opened monthly.

What Android allows

Android is more flexible but has tightened every year:

  • WorkManager runs deferrable work with constraints (network, charging) and a minimum periodic interval of 15 minutes, subject to Doze and battery optimisations.
  • Foreground services run continuously with a visible notification, and since Android 14 must declare a type (location, media playback, connected device and others) that matches what they do. Google Play also reviews certain types.
  • Manufacturer battery savers on some devices stop background work more aggressively than stock Android.

expo-background-task

expo-background-task, introduced in Expo SDK 53, is the modern way to schedule periodic work in Expo apps:

import * as BackgroundTask from "expo-background-task";
import * as TaskManager from "expo-task-manager";

const SYNC_TASK = "background-sync";

TaskManager.defineTask(SYNC_TASK, async () => {
  try {
    await syncOutbox(); // push pending changes, pull new data
    return BackgroundTask.BackgroundTaskResult.Success;
  } catch {
    return BackgroundTask.BackgroundTaskResult.Failed;
  }
});

export async function registerBackgroundSync() {
  await BackgroundTask.registerTaskAsync(SYNC_TASK, { minimumInterval: 60 }); // minutes
}

Define the task at module level (outside components) so it's available when the OS launches your app in the background. Note that minimumInterval is in minutes, unlike the older expo-background-fetch, which used seconds, so values copied from old code will be off by a factor of 60. The interval is a minimum, not a schedule: on iOS the system chooses the actual time, and on Android it can't be shorter than 15 minutes.

The special cases that do run continuously

  • Location: with the right permissions and background mode, expo-location can deliver location updates or geofence events to a background task. Both stores scrutinise this heavily.
  • Bluetooth: iOS apps with the Bluetooth background mode can keep talking to a connected accessory and reconnect when it comes back in range.
  • Audio: playback and recording apps keep running while audio plays.
From the field: I've built both of the hard cases: LYOS, a travel app that builds a private storyline of trips automatically from background location, and SuraSole Golf, whose app pairs with smart insoles over Bluetooth Low Energy with background reconnect and real-time streaming. Both are features where working with the operating system's rules, rather than around them, is the only design that holds up on real devices.

Silent push: let the server decide

Instead of polling, your server can send a background (silent) push when there's new data, and the app wakes briefly to fetch it. It's efficient, but iOS throttles silent pushes and may not deliver them if the user force-quit the app or the device is in low power mode. Treat it as an optimisation, not a guarantee.

Designing for reality

  1. Sync when it's guaranteed: on app launch, on return to foreground, and on reconnect.
  2. Use background tasks to keep data fresh, so the next launch is faster, not to deliver time-critical information.
  3. Use push notifications for time-critical events, and fetch details when the user opens the app.
  4. Use the special background modes only for features that need them, with clear user value and permissions.
  5. Make background work short and idempotent, because it can be cut off at any moment.

Why background tasks seem "not to work"

SymptomLikely cause
Task never runs on iOSApp rarely opened, low power mode, or testing too soon; iOS decides
Task runs once then stopsTask not defined at module level, or errors not handled
Runs far less often than the intervalExpected: the interval is a minimum, not a schedule
Works in development, not in releaseBackground capabilities or task identifiers missing from the release build
Stops on some Android phonesManufacturer battery optimisation; guide users to exclude the app if it's essential

Foreground, background and AppState

Much "background" work is really "when the app comes back" work. React Native's AppState tells you when the app moves between active and background, which is the right moment to refresh data, reconnect sockets or pause timers:

useEffect(() => {
  const sub = AppState.addEventListener("change", (state) => {
    if (state === "active") refreshStaleData();
  });
  return () => sub.remove();
}, []);

Doing this well removes the need for many background tasks: the app catches up the moment the user returns.

FAQ

Can a React Native app run code in the background?

Yes, within the operating systems' limits. Periodic tasks run when iOS or Android allows (with Expo, through expo-background-task), and specific features like location, audio and Bluetooth accessories can run continuously with the right background modes and permissions.

Why is my React Native background fetch not working?

On iOS, the system decides when background refresh runs based on how often the app is used, battery and network, so it may run rarely or not at all during testing. On Android, the minimum interval is 15 minutes and battery optimisations can delay it. Check that the task is defined at module level and registered in a release build.

What replaced expo-background-fetch?

expo-background-task, introduced in Expo SDK 53. It uses BGTaskScheduler on iOS and WorkManager on Android, with a nearly identical API, except that minimumInterval is specified in minutes instead of seconds.

Can I run a task every 5 minutes in the background?

Not reliably on either platform. iOS schedules background refresh itself, and Android's periodic work has a 15-minute minimum. For frequent updates, use push notifications for important events and sync when the app is opened.

Next steps

If your app depends on background location, Bluetooth or sync and it isn't behaving on real devices, I can design it around the platform rules and make it reliable. Get in touch, or see how I work as a React Native developer.

Sources

Bhuwanesh Sisodia

Bhuwanesh Sisodia

Full-Stack, Mobile & AI Engineer

Bhuwanesh Sisodia is a Full-Stack, Mobile & AI Engineer based in Mumbai, with 7+ years of experience and 50+ apps shipped to the App Store and Google Play. He works independently with startups and product teams worldwide.

About meGitHubLinkedInX

Related