Device Features· 6 min read

Background Location in React Native That Passes App Review

Background location in React Native and Expo: iOS and Android permissions, location tasks, geofencing, battery, and passing App Store and Play review.

By

Full-Stack, Mobile & AI Engineer

Background location is one of the most powerful features a mobile app can have, and one of the most scrutinised. It powers trip journals, delivery tracking, fitness routes and safety apps. It also drains batteries, worries users, and attracts close attention from Apple and Google, who reject apps that ask for it without an obvious reason.

This guide covers React Native background location in 2026 with Expo: how permissions work on each platform, how to receive location updates in a background task, when geofencing is the better tool, how to protect battery life, and how to pass review on both stores. It draws on building LYOS, a travel app that creates a private storyline of trips automatically from background location.

Key takeaways

  • Ask for "while using" first, then "always", only when the user turns on the feature that needs it, with a clear explanation.
  • Use OS location updates delivered to a background task (expo-location with expo-task-manager), not timers that try to poll the GPS.
  • Geofencing and significant location changes are far kinder to the battery than continuous tracking, and often enough.
  • Android needs a foreground service with the location type for continuous tracking, and Google Play requires a declaration (often with a video).
  • Apple reviews the purpose string and the feature: background location must clearly benefit the user and be explained in the app.

How permissions work

PlatformStepsNotes
iOS"While using the app" first, then "Always"iOS may show the "Always" choice later, after the app uses location in the background
Android 10Foreground location, then background location separatelyBackground is a separate permission
Android 11 and laterForeground first; background granted in system settingsThe app sends users to settings for "Allow all the time"

Request foreground permission when the user starts a location feature. Request background permission only when they turn on the part that truly needs it ("Record my trips automatically"), on a screen that explains what you collect, why, and how to turn it off.

Location updates in a background task

With Expo, define a task and start location updates that the OS delivers to it, even when the app is in the background:

import * as Location from "expo-location";
import * as TaskManager from "expo-task-manager";

const LOCATION_TASK = "trip-location";

TaskManager.defineTask(LOCATION_TASK, async ({ data, error }) => {
  if (error) return;
  const { locations } = data as { locations: Location.LocationObject[] };
  await saveLocationsLocally(locations); // write to SQLite; sync later
});

export async function startTripTracking() {
  const fg = await Location.requestForegroundPermissionsAsync();
  if (fg.status !== "granted") return;
  const bg = await Location.requestBackgroundPermissionsAsync();
  if (bg.status !== "granted") return;

  await Location.startLocationUpdatesAsync(LOCATION_TASK, {
    accuracy: Location.Accuracy.Balanced,
    distanceInterval: 50,          // metres between updates
    showsBackgroundLocationIndicator: true,
    foregroundService: {
      notificationTitle: "Recording your trip",
      notificationBody: "Tap to open the app or stop recording.",
    },
  });
}

Define the task at module level so it exists when the OS wakes the app. Save locations locally and sync them later; network calls inside location callbacks are fragile.

"Tracking without timeout": why timers don't work

A common request is to run a timer every few seconds in the background and read the GPS. Operating systems don't allow apps to run indefinitely just because a timer exists. The reliable pattern is the one above: let the OS deliver location updates to your task, with distance and accuracy settings that match the feature.

expo-location vs react-native-background-geolocation

expo-location with a background task covers most products: trip recording, delivery tracking, running apps. react-native-background-geolocation, from Transistor Software, adds motion-detection that pauses GPS when the phone is still, persistence and HTTP sync built in, and years of tuning for aggressive Android battery savers; it needs a paid licence for Android release builds. Choose it when battery life and reliability across many Android brands are the core of the product.

Background fetch is a different tool. Tasks such as expo-background-task run periodically at times the OS chooses, with a minimum interval measured in minutes, which is fine for syncing data and wrong for tracking a route.

Geofencing and significant changes

Often you don't need a continuous trail:

  • Geofencing (Location.startGeofencingAsync) wakes your task when the user enters or leaves defined regions, such as a gym or an office.
  • Coarser, distance-based updates (larger distanceInterval, balanced accuracy) capture movement between places at a fraction of the battery cost.

For a trip journal, knowing "arrived in Lisbon, visited three places" can matter more than every metre of the drive.

From the field: LYOS, which I built for a UK client, creates a private storyline of a user's trips automatically from background location, organised into location-based chapters, with itinerary planning and recommendations from the user's own network. Features like that live or die on two things: battery life and users trusting what the app does with their location.

Battery

  • Use the lowest accuracy that serves the feature.
  • Increase distance intervals; stop updates when the user is stationary.
  • Stop tracking when the feature is off, and give users a visible way to pause it.
  • Test a full day on a real device and watch battery usage in the system settings.

Privacy by design

Location history is some of the most sensitive data an app can hold. Keep only what the feature needs: store raw points on the device, upload summaries (places and times) where possible, set a retention period, and let users view, pause and delete their history from inside the app. Never share precise location with analytics or advertising tools. Besides being the right thing to do, this is what makes users comfortable granting "Always" in the first place.

Passing App Store review

  • Purpose strings: NSLocationWhenInUseUsageDescription and NSLocationAlwaysAndWhenInUseUsageDescription must explain the specific benefit.
  • Background mode: enable location updates in background modes only if the feature needs it.
  • Visible value: reviewers should see the feature that uses background location within a minute of opening the app. Point to it in the review notes.

Passing Google Play review

  • Declare background location in Play Console's permissions declaration, describing the core feature and usually providing a short video of it in use.
  • Show a prominent in-app disclosure before the permission request, explaining what's collected and why.
  • Use the location foreground service type for continuous tracking on Android 14 and later.
  • Remove background location entirely if it's added by a library you don't need for it.

FAQ

How do I track location in the background in React Native?

With Expo, request foreground and background location permissions, define a task with expo-task-manager, and call Location.startLocationUpdatesAsync with that task. The OS delivers updates to the task even when the app is in the background, within each platform's rules.

Why does background location stop after a while?

Usually because the app relied on timers instead of OS location updates, permissions were downgraded, the Android foreground service wasn't configured, or a manufacturer's battery optimisation stopped the app. Use location updates delivered to a background task, and test on several Android devices.

Does Google Play allow background location?

Yes, for apps whose core functionality needs it, such as trip recording, delivery tracking or safety features. You must complete the background location declaration in Play Console, show a prominent disclosure in the app, and often provide a video of the feature.

Is geofencing better than continuous location tracking?

For many features, yes. Geofencing wakes the app only when users enter or leave specific places, which uses far less battery than continuous tracking. Use continuous tracking only when the feature needs the route itself, such as recording a run or a delivery.

Next steps

If your app needs background location and you want it reliable, battery-friendly and approved by both stores, I've built it and can help you design and ship it. 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