GeoFencec() Only Template For Capturing Entry / Exit

GeoFencec() Only Template For Capturing Entry / Exit

Notes
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,   
GeoFenceModeHighAccurecy: False
In Short
  1. It only really matters for Android and for startGeofences().
  2. It doesn’t buy you anything with start() (full tracking), and
  3. 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:
  1. Battery usage is higher (similar to running “real” GPS tracking more often)
  2. The user sees a persistent notification on Android because of the foreground service.
  3. Higher battery usage – closer to normal continuous tracking.
  4. 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()?
  1. Much more battery-friendly.
  2. No persistent Android notification (only whatever normal background behavior you configure).
  3. Good when:
  4. Your geofences are reasonably large (e.g. 200–300m+).
  5. 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
  1. Use a radius around 200–300m (which you’re already doing), not tiny 30–50m fences, for car arrivals.
  2. Increase geofenceProximityRadius to 5 or even 10 Kilometers, This tell the system, How Far from the Zone to Start Detecting (in Meters) 
  3. Place the geofence over the access road / gate, not in the geometric centre of a 1 km wide site.
  4. 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

    • Related Articles

    • Continuous Tracking Template

      This document is intended solely for system administrators and technical developers responsible for configuring and maintaining Transistorsoft settings. While it is accessible in the public knowledge base, it is not designed for end users or general ...
    • Setting up Web Timesheet Templates

      In ClickTime Australia, the Web Timesheet and the Mobile Time Attendance are two distinct tools designed for different types of employees: The Web Timesheet is intended for office-based staff who prefer to log their working hours using a web browser. ...
    • Overtime template setting & configuration

      Overtime template is basically a template that has one or rules that defines under what conditions and at what rate employee overtime is paid. Accurately calculating your employee's work hours is crucial to running a successful business. It shows ...
    • Getting Started with ClickTime Payroll

      Overview This guide walks you through the complete payroll setup process in ClickTime Australia — from defining pay cycles and creating pay categories to assigning templates, approving timesheets, recalculating payroll, and exporting data to your ...
    • Manage Pay Cycles / Pay Periods

      Overview In ClickTime Australia, a pay cycle defines the recurring period used to calculate wages and determine pay dates. Whether your organisation pays staff weekly, fortnightly, or monthly, you can configure single or multiple pay cycles to suit ...