Platform Differences
The plugin provides a unified API across platforms. Some features are platform-specific by nature — this page maps what's available where.
Methods
| Feature | iOS | Android | Web |
|---|---|---|---|
configure() | ✅ | ✅ | ✅ |
start() | ✅ | ✅ | ✅ |
stop() | ✅ | ✅ | ✅ |
getState() | ✅ | ✅ | ✅ |
getCurrentPosition() | ✅ | ✅ | ✅ |
checkPermissions() | ✅ | ✅ | ✅ |
requestPermissions() | ✅ | ✅ | ✅ |
getVersion() | ✅ | ✅ | ✅ |
addGeofence() | ✅ | ✅ | ❌ |
addGeofences() | ✅ | ✅ | ❌ |
removeGeofence() | ✅ | ✅ | ❌ |
removeAllGeofences() | ✅ | ✅ | ❌ |
getGeofences() | ✅ | ✅ | ❌ |
checkBatteryOptimization() | ❌ | ✅ | ❌ |
requestBatteryOptimization() | ❌ | ✅ | ❌ |
Events
| Feature | iOS | Android | Web |
|---|---|---|---|
onLocation | ✅ | ✅ | ✅ |
onHeartbeat | ✅ | ✅ | ✅ |
onProviderChange | ✅ | ✅ | ❌ |
onHttp | ✅ | ✅ | ❌ |
onDebug | ✅ | ✅ | ❌ |
onBatteryWarning | ❌ | ✅ | ❌ |
onAccuracyWarning | ✅ | ❌ | ❌ |
onMockLocation | ❌ | ✅ | ❌ |
onPermissionRationale | ❌ | ✅ | ❌ |
onTrialExpired | ✅ | ✅ | ❌ |
onGeofence | ✅ | ✅ | ❌ |
Behavioral Differences
Background Execution
iOS: Uses Background Location Mode, the system may throttle updates when the app is suspended. Significant Location Change (SLC) is used as a fallback to relaunch the app.
Android: Uses a Foreground Service with a persistent notification. No throttling — as long as the service runs, updates flow continuously.
Heartbeat Timer
iOS: Uses a background-safe timer. The system may delay callbacks depending on Background App Refresh state.
Android: Uses
Handler.postDelayed in the foreground service — precise timing.Permissions
iOS: "Always" permission via
requestAlwaysAuthorization. Users may grant "While Using" first, then promote later.Android:
ACCESS_FINE_LOCATION + ACCESS_BACKGROUND_LOCATION must be requested separately. POST_NOTIFICATIONS permission required for Android 13+.Geofencing
iOS: Uses
CLCircularRegion. Monitoring persists across app restarts. System limit: 20 regions per app.Android: Uses
GeofencingClient. The plugin re-registers geofences after device reboot. Limit: 100 per app, plugin enforces 20.Web (Development Fallback)
The web implementation uses navigator.geolocation.watchPosition. It supports basic location tracking and heartbeats for development and testing. Geofencing, HTTP posting, and native services are not available on the web platform.