Service Migration
Apps that use react-native-geolocation-service should migrate directly to the
Modern API:
Do not migrate through react-native-nitro-geolocation/compat. The service
package exposes Android fused-provider and settings-dialog behavior that maps
more closely to Nitro Geolocation's Modern Android provider/settings API.
Agent Skill
This repository ships an Agent Skills-compatible migration playbook for this path:
The skill source is
skills/service-migration.
The bundled helper script can inventory and safely transform the first pass:
If the app startup file is obvious, the script can also add the Modern startup configuration:
Startup Configuration
Configure Nitro Geolocation once near app startup.
Normal react-native-geolocation-service migrations should explicitly use
Google Play Services fused location on Android:
Use locationProvider: 'android' only when the legacy app intentionally used
forceLocationManager: true or the product requires Android LocationManager.
API Mapping
forceRequestLocation has no direct Modern option. Preserve that fallback
behavior manually only after reviewing the intended UX.
One-Shot Location
Prefer a Promise chain for mechanical migrations so the containing function does
not need to become async immediately.
Do not add requestLocationSettings() when the legacy call explicitly used
showLocationDialog: false.
When showLocationDialog was omitted, review the flow manually. The service
package default was true; Nitro Modern API requires an explicit settings flow.
Watches
Use the low-level Modern watch API as the first safe target:
Upgrade to useWatchPosition() only when the watch is owned by a React function
component or custom hook and the existing callbacks do not contain
ordering-sensitive side effects such as analytics, navigation, mutation, or
debouncing.
Permission Differences
Legacy requestAuthorization() can return disabled. Modern
requestPermission() returns permission status only:
If the old code handled disabled, check device-level service state separately:
Default Differences
Review call sites that omit options:
For fresh user-facing location, choose explicit options such as:
For cached UI, read cached state explicitly with getLastKnownPosition() and
then refresh if the product flow needs it.
