Skip to main content

React Native Location Services

ยท 7 min read
Full Stack Developer
Last updated on May 17, 2026

react native location

Location features can make a React Native app feel useful immediately: nearby listings, delivery tracking, taxi pickup, store locators, real estate search, fitness routes, and local recommendations all depend on coordinates. They also touch privacy, battery, app store review, and cloud costs.

This guide shows a modern way to handle location in React Native: request the least permission you need, read location safely, avoid background tracking unless the product truly requires it, and test on real devices before release.

Quick Answerโ€‹

For most React Native apps, use foreground location first:

import * as Location from 'expo-location';

export async function getCurrentCoordinates() {
const permission = await Location.requestForegroundPermissionsAsync();

if (permission.status !== 'granted') {
return null;
}

const location = await Location.getCurrentPositionAsync({
accuracy: Location.Accuracy.Balanced,
});

return {
latitude: location.coords.latitude,
longitude: location.coords.longitude,
accuracy: location.coords.accuracy,
};
}

Only request background location for features where users clearly expect tracking outside the app, such as active delivery, ride tracking, or workout recording. Most apps should not ask for background location.

Choose the Right Location Libraryโ€‹

Current React Native apps commonly use one of these approaches:

OptionBest forNotes
expo-locationApps with Expo modules or Expo-managed workflowsHandles foreground/background permissions, current position, geocoding, geofencing, and watchers.
Native location APIs through app-specific modulesApps with custom native requirementsUse when the app already owns native location code or needs deep platform behavior.
@react-native-community/geolocationExisting apps already built around that APIAvoid starting new work with old navigator.geolocation tutorials.

Instamobile apps that include location features already document their expected module path and dependencies. Start with the included README and the Location Core Module.

Mega Bundle Sale is ON! Get ALL of our React Native codebases at 90% OFF discount ๐Ÿ”ฅ

Get the Mega Bundle

Install Location Supportโ€‹

Use the package manager and versions declared by the app. For an Expo modules setup, install the package compatible with the app:

corepack yarn add expo-location

If your project uses Expo CLI dependency resolution, use:

npx expo install expo-location

Then run the normal app checks:

corepack yarn typecheck
corepack yarn ios
corepack yarn android

iOS Permission Stringsโ€‹

iOS requires a user-facing reason in Info.plist before a location permission prompt can appear. The copy should explain the feature, not use a generic placeholder.

Common keys:

<key>NSLocationWhenInUseUsageDescription</key>
<string>Allow location access to show nearby listings and set your pickup point.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Allow background location while an active delivery or ride is in progress.</string>

Use When In Use for most apps. Add Always only when background tracking is part of the product and is clear to the user.

For app store review, make sure the permission prompt, privacy policy, App Privacy details, and actual behavior all say the same thing.

Android Runtime Permissionsโ€‹

Android location permissions are split by precision and foreground/background behavior.

Typical manifest entries:

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

Only include background location when the app has a real background use case:

<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />

Modern Android users can choose approximate location even when an app asks for precise location. Design your feature so approximate location still works where possible. For example:

  • city-level discovery can usually use approximate location;
  • map centering can often start with approximate location;
  • turn-by-turn navigation, delivery tracking, and taxi pickup usually need precise location.

Request foreground access first. Ask for background access later, only at the moment the user enables a feature that needs it.

Request Foreground Locationโ€‹

This is the safest baseline for most apps:

import * as Location from 'expo-location';

type Coordinates = {
latitude: number;
longitude: number;
accuracy: number | null;
};

export async function requestCurrentLocation(): Promise<Coordinates | null> {
const { status, canAskAgain } =
await Location.requestForegroundPermissionsAsync();

if (status !== 'granted') {
if (!canAskAgain) {
// Show app settings instructions in your UI.
}
return null;
}

const current = await Location.getCurrentPositionAsync({
accuracy: Location.Accuracy.Balanced,
});

return {
latitude: current.coords.latitude,
longitude: current.coords.longitude,
accuracy: current.coords.accuracy,
};
}

Use high accuracy only when the product needs it. Higher accuracy can increase battery usage and may make permission requests feel more invasive.

Watch Location Changesโ€‹

Use a watcher when the user is actively interacting with a location feature, such as moving a pickup pin or tracking a driver on a map.

import * as Location from 'expo-location';

export async function subscribeToForegroundLocation(
onLocation: (location: Location.LocationObject) => void
) {
const permission = await Location.requestForegroundPermissionsAsync();

if (permission.status !== 'granted') {
return null;
}

return Location.watchPositionAsync(
{
accuracy: Location.Accuracy.Balanced,
distanceInterval: 25,
timeInterval: 5000,
},
onLocation
);
}

Always remove subscriptions when the screen unmounts:

const subscription = await subscribeToForegroundLocation(handleLocation);

// Later:
subscription?.remove();

Background Location Requires Product Justificationโ€‹

Background location is a product and privacy decision, not just a technical setting.

Use it for:

  • an active delivery driver session;
  • an active taxi/ride session;
  • fitness route recording after the user starts a workout;
  • safety features where the user explicitly enables tracking.

Avoid it for:

  • generic analytics;
  • "nearby recommendations" that can work when the app opens;
  • inactive users;
  • growth or retargeting.

If background tracking is required, add:

  • clear onboarding copy;
  • visible in-app controls to stop tracking;
  • platform-specific permission strings;
  • store privacy disclosures;
  • battery testing on real devices;
  • backend rate limits and retention rules.

Geocoding and Reverse Geocodingโ€‹

Geocoding converts an address into coordinates. Reverse geocoding converts coordinates into an address.

With expo-location:

const results = await Location.reverseGeocodeAsync({
latitude,
longitude,
});

Use geocoding carefully:

  • debounce address input;
  • cache repeated results;
  • avoid background geocoding loops;
  • do not fire geocoding requests on every map drag frame;
  • consider Google Places or another dedicated provider for address search.

Geocoding and Places services can create cloud costs. Set quotas and budget alerts when using paid providers.

Release Checklist for Location Featuresโ€‹

Before release:

  • Permission prompts explain the feature clearly.
  • iOS Info.plist contains the required location strings.
  • Android manifest contains only the permissions the app needs.
  • Approximate location behavior is tested.
  • Precise location behavior is tested.
  • Denied permission state has a useful fallback UI.
  • Real devices were tested, not only simulators.
  • Background tracking is avoided unless required.
  • Privacy policy and store forms mention location collection accurately.
  • Maps, geocoding, and Places API keys are restricted and monitored.

For broader release work, use the React Native App Release Checklist.

Looking for a custom mobile application?

Our team of expert mobile developers can help you build a custom mobile app that meets your specific needs.

Get in Touch

FAQโ€‹

Should I request precise location?โ€‹

Only when the feature needs it. Nearby browsing, city search, and broad recommendations can often work with approximate location. Pickup, delivery, navigation, and fitness tracking usually need higher precision.

Can I ask for background location on first launch?โ€‹

Avoid it. Ask for foreground location when the user starts a location feature. Ask for background location later only if the user enables a feature that clearly requires it.

Does GPS location cost money?โ€‹

Reading device GPS does not bill Google Maps by itself. Costs usually come from maps, Places, geocoding, routing, distance matrix, or other cloud APIs you call around the location feature.

Why does location work in debug but fail in release?โ€‹

Common causes are missing iOS permission strings, missing Android manifest permissions, wrong API key restrictions, disabled Google Maps APIs, and testing only in a simulator.

Conclusionโ€‹

Location features should be useful, minimal, and transparent. Request foreground access first, handle denied and approximate states gracefully, use background tracking only when the product needs it, and verify every location flow on real devices before release.