Socket
Book a DemoInstallSign in
Socket

expo-quest-location

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expo-quest-location

A fork of expo-location that provides two implementations: The default expo-location behavior using Google Play Services. A Meta Quest-compatible implementation that does not rely on Google Play Services.

latest
Source
npmnpm
Version
18.1.19
Version published
Weekly downloads
2
-85.71%
Maintainers
1
Weekly downloads
 
Created
Source

expo-quest-location

A fork of expo-location that provides two implementations:

  • The default expo-location behavior using Google Play Services.
  • A Meta Quest–compatible implementation that does not rely on Google Play Services.

You can choose which implementation to use with the EXPO_HORIZON environment variable. This makes it compatible with Meta Quest devices, while remaining a drop-in replacement for expo-location on Android and iOS.

Usage

  • Install the package:
npx expo install expo-quest-location
  • Update your app.json / app.config.js to replace expo-location with expo-quest-location.
  • Prebuild your app with the export EXPO_HORIZON=1 environment variable set (to return to the type just remove the environment variable: unset EXPO_HORIZON).
  • Update your imports:
import * as Location from 'expo-quest-location';

Behavior

  • With EXPO_HORIZON=1 → Uses the Meta Quest–compatible location API (no Google Play Services).
  • Without EXPO_HORIZON → Falls back to the default expo-location behavior (Google Play Services Location API).
  • On iOS → The EXPO_HORIZON flag has no effect; behavior is always the same as expo-location.

[!IMPORTANT] The EXPO_HORIZON version is intended specifically for Meta Quest devices. Using it on standard Android devices is not recommended, as certain features may be unsupported or behave differently.

This ensures compatibility across Quest, standard Android devices, and iOS.

Additional features

  • Location.isQuest() → Returns true if the device is a Meta Quest device.

Features supported on Meta Quest

Function NameAndroid DevicesMeta QuestNotes
enableNetworkProviderAsync✅ Supported✅ Supported
getProviderStatusAsync✅ Supported✅ Supported
hasServicesEnabledAsync✅ Supported✅ Supported
requestForegroundPermissionsAsync
requestBackgroundPermissionsAsync
✅ Supported✅ Supported
getForegroundPermissionsAsync
getBackgroundPermissionsAsync
✅ Supported✅ Supported
getCurrentPositionAsync
watchPositionAsync
✅ Supported✅ SupportedThe GPS provider is not available on Quest devices. If selected, the network provider will be used instead. Note that, based on experiments, the network provider updates no more frequently than every 10 minutes.
getLastKnownPositionAsync✅ Supported✅ Supported
watchHeadingAsync
getHeadingAsync
✅ Supported❌ Not supportedMagnetic and accelerometer sensors are not available on Quest.
geocodeAsync
reverseGeocodeAsync
✅ Supported❌ Not supportedThe Geocoder is not present on Quest.
startGeofencingAsync
stopGeofencingAsync
hasStartedGeofencingAsync
✅ Supported❌ Not supportedMeta Horizon Store doesn't support ACCESS_BACKGROUND_LOCATION Android permission.
startLocationUpdatesAsync
stopLocationUpdatesAsync
hasStartedLocationUpdatesAsync
✅ Supported❌ Not supportedMeta Horizon Store doesn't support ACCESS_BACKGROUND_LOCATION Android permission.

Contributing

  • Build the package:
cd expo-quest-location
yarn build
  • Install, run and test the library using the example app:
cd ../example
yarn
yarn quest # to run the app on Quest
yarn android # to run the app on Android
yarn ios # to run the app on iOS

[!NOTE] You need to prebuild the app to see changes reflected in the example app.

  • Publish the package:
npm publish --access public

Keywords

react-native

FAQs

Package last updated on 19 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts