3

I’m developing a mobile app in React Native using Expo, and I’m testing it through an EAS development build (not Expo Go). The app uses Bluetooth Low Energy (BLE) to communicate with an external device and relies on continuous geolocation updates.

The issue I’m facing is that when the phone screen is locked, I’m unable to keep both BLE and GPS active at the same time. After the device goes into lock screen, the OS starts restricting the app: sometimes the BLE connection drops, sometimes location updates stop, and occasionally both are suspended.

The intended behavior requires the app to work with the screen off, so background execution is essential. I’ve already tried requesting "always" location permissions, disabling battery optimizations, and using background tasks / services, but the behavior remains unstable once the screen is locked.

I’m trying to understand what the correct approach is in this scenario. Is a foreground service mandatory to reliably keep BLE and GPS running in the background? Are there known limitations with Expo / React Native regarding this kind of use case, or recommended architectural patterns to handle it properly?

Any insights, best practices, or references to documentation would be very helpful.

Thanks in advance.

I’m targeting Android only (testing on real devices using an EAS development build, not Expo Go).

These are the packages I’m currently using:

React Native Core

react, react-native, expo, expo-router

UI & Navigation

react-native-maps

react-native-reanimated, react-native-gesture-handler

@react-navigation/native, @react-navigation/bottom-tabs

@expo/vector-icons

react-native-toast-message

react-native-safe-area-context, react-native-screens

Firebase

@react-native-firebase/app, @react-native-firebase/auth, @react-native-firebase/firestore

firebase (JS SDK)

Hardware & Sensors

react-native-ble-plx (Bluetooth Low Energy)

expo-location (GPS)

expo-haptics

expo-av

Utilities

react-native-base64

react-native-sse

@react-native-async-storage/async-storage

expo-crypto, expo-font, expo-image

Auth

@react-native-google-signin/google-signin

expo-auth-session

Dev Dependencies

typescript

eslint

@expo/cli

patch-package

asked Dec 29, 2025 at 0:15
1
  • You should clarify what platform(s) you are using because there are significant differences between iOS and Android. Also list any packages you are using. Commented Dec 29, 2025 at 21:19

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.