This document is intended solely for system administrators and technical developers responsible for configuring and maintaining the Auto Clocking settings. While it is accessible in the public knowledge base, it is not designed for end users or general staff. Non‑technical readers may find the content highly specialized and should not rely on it for operational guidance.
// Template: Continuous Tracking Template
templateName: "Continuous Tracking Template",
trackingMode: "start", // your own field → call BackgroundGeolocation.start()
// For Android defaults
foregroundService: true, // Always Keep it at TRUE. Do Not Change This
enableHeadless: true // Always Keep it at TRUE. Do Not Change This
stopOnTerminate: false, // Always Keep it at FALSE. Do Not Change This
startOnBoot: true, // Always Keep it at FALSE. Do Not Change This
// Geofences
geofenceProximityRadius: 4000, // How Far from the Zone to Start Detecting (in Meters).
geofenceInitialTriggerEntry: true, //Always Keep it at FALSE. Do Not Change This. very important so existing onsite staff get an ENTER immediately
// --- Geolocation behaviour ---
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_MEDIUM, // Low or medium is usually enough for geofences
// distanceFilter / intervals are largely irrelevant in pure geofence mode,
// but required if you enable geofenceModeHighAccuracy on Android:
distanceFilter: 50, // In meters. Distance-based tracking: report when moved ~50m. Good balance car/walking.
locationUpdateInterval: 30000, // 30s for when high-accuracy mode is on
fastestLocationUpdateInterval: 15000, // 15s (Android only)
geofenceInitialTriggerEntry: true,
geofenceModeHighAccuracy: false,
In Short
- It only really matters for Android and for startGeofences().
- It doesn’t buy you anything with start() (full tracking), and
- Turning it on makes geofences much more responsive but costs more battery and shows a persistent notification.
When false = lowest battery, ENTER/EXIT fires a bit later (must move deeper in/out of region)
if you set true for a specific client, also use:
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_MEDIUM,
locationUpdateInterval: 5000,
distanceFilter: 50
When geofenceModeHighAccuracy: true:
- Battery usage is higher (similar to running “real” GPS tracking more often)
- The user sees a persistent notification on Android because of the foreground service.
- Higher battery usage – closer to normal continuous tracking.
- Shows a persistent notification on Android (some clients may not like this)
Should you use it with start()?
NO, Not Realy
Should you use it with startGeofences()?
- Much more battery-friendly.
- No persistent Android notification (only whatever normal background behavior you configure).
- Good when:
- Your geofences are reasonably large (e.g. 200–300m+).
- You are OK if clock-in/out happens with a small delay (e.g. 30–120 seconds after they enter/leave).
Settings that actually help (a bit) with geofenceModeHighAccuracy = false
Use a radius around 200–300m (which you’re already doing), not tiny 30–50m fences, for car arrivals.- Increase geofenceProximityRadius to 5 or even 10 Kilometers, This tell the system, How Far from the Zone to Start Detecting (in Meters)
- Place the geofence over the access road / gate, not in the geometric centre of a 1 km wide site.
- If you centre it in the middle of a huge site, the user might drive inside the physical site for some time before crossing the geofence circle.
disableElasticity: false, // Keep Transistorsoft’s speed-based elasticity enabled so highway driving uses larger distanceFilter automatically.
useSignificantChangesOnly: true, // Extra battery saving: only a few updates per hour when device moves significantly.
// --- Activity recognition & stop-detection ---
stopTimeout: 5, // minutes in moving state before going stationary after STILL detected
stopOnStationary: false, // don't auto-stop, just go to stationary state and keep background service alive
stationaryRadius: 25, // default; keep it tight so we re-enter moving quickly if they leave
// --- App lifecycle / persistence (cross-platform) ---
stopOnTerminate: false, // Always Keep it at FALSE. Do Not Change This
startOnBoot: true, // Always Keep it at TRUE. Do Not Change This
// iOS-specific: optional heartbeat to run health checks while stationary
preventSuspend: true, // allow heartbeat in background. Always Keep it at TRUE. Do Not Change This
heartbeatInterval: 900, // 900s = 15 minutes (min 60s; don’t go crazy)
// Android-only robustness
foregroundService: true, // Always Keep it at TRUE. Do Not Change This
enableHeadless: true, // Always Keep it at TRUE. Do Not Change This
// No persistence. Locations are kept in memory only and discarded if the app is terminated.
persistMode: BackgroundGeolocation.PERSIST_MODE_NONE //value is ZERO
maxDaysToPersist: 0, // maxDaysToPersist = 0 → meaning no automatic purge. Do Not Change This
maxRecordsToPersist: -1 // -1 → Unlimited persistence (no cap on record count). Do Not Change This
// Logging
debug: false,
logLevel: BackgroundGeolocation.LOG_LEVEL_INFO