Tune GPS tracking and check-in distance for activities

What you’ll do

Here’s how to dial in the location settings that control activities in your app: how close someone has to be to a location before they can check in, whether they can override that distance, and how the app records GPS while an activity is underway.

You’ll find all of these together in the Activity group on the App Settings page — no code required. Set them once and they apply to every activity location in the app.

Reach for this when your app has location-based activities — visiting a site, working a route, completing a task at a venue — and you want to control check-in accuracy or capture a GPS trail of the work.


Before you start

  • mam-main is active and your app builds and previews normally.
  • Your app actually uses activities (location-bound tasks that a user starts, works, and ends). If your app is a plain directory or content app with no activity flow, these settings have no effect.
  • Your activity locations have valid coordinates. Distance checks compare the user’s device GPS against each location’s stored latitude/longitude, so a location with no coordinates can’t be distance-gated.
  • The app has location permission on the device. Distance-to-check-in and GPS tracking both depend on the OS granting location access. If you offer a button to send users to their device location settings, that’s the Enable Location Services content type (open_location_services).

Where these settings are

You’ll find every setting below on the App Settings page, in the Activity group — the one labeled “Activity” in the left-hand category list.

Each of these Activity settings is stored as a WordPress option named tsl- followed by the variable name shown in the tables — for example, distance_for_check_in is saved as the option tsl-distance_for_check_in. You’ll never need to touch the options directly; the App Settings UI reads and writes them for you. They’re listed here in case a developer on your team ever needs to track one down.


Step 1 — Set the allowable check-in distance

This is the core control: how far a user can be from a location and still be allowed to check in.

Setting (UI label) Variable Type
Allowable Distance for Check in – Feet (0 or blank for infinite) distance_for_check_in text (feet)

Enter the distance in feet. A user whose device is within that many feet of the location’s coordinates can check in normally.

  • Enter 0 or leave it blank for no distance limit — anyone can check in regardless of where they are. Use this when check-in is just a “I’m here” tap and physical proximity doesn’t matter.
  • Enter a number (e.g. 300) to require the user to be within that radius. Use this when check-in should prove the user is actually on site.

The value is always in feet — the setting’s label spells that out (“…- Feet”) — and it’s checked against the device’s measured distance to the location.


Step 2 — Decide whether users can override the distance

Sometimes a user genuinely needs to check in even though GPS says they’re not close enough — weak signal, an indoor location, a coordinate that’s slightly off. You can allow an override.

Setting (UI label) Variable Type
Allow override if not close enough to location? distance_for_check_in_override yes / no
  • No — the distance limit from Step 1 is strict. If the user is too far away, check-in is blocked.
  • Yes — the user is warned that they’re outside the allowed distance but can proceed anyway.

When override is on, you can customize the prompt the user sees:

Setting (UI label) Variable Type
Activity checkin override title activity_override_start_title text
Activity checkin override message activity_override_start_message text

These control the title and message on the “you’re not close enough — check in anyway?” prompt. Leave them blank and the app falls back to its default wording, or tailor them to your use case — for example, title “Not at the location?” and message “We couldn’t confirm you’re on site. Check in anyway?”

The override title and message only matter when distance_for_check_in_override is Yes. If override is off, the user never sees this prompt.


Step 3 — Track GPS while the activity is in progress

Separate from check-in, you can have the app record the user’s GPS over the course of an activity — useful for proof-of-presence, route capture, or a breadcrumb trail of where work happened.

Setting (UI label) Variable Type
Track GPS pings during activity send_gps_pings_on_activities yes / no
Distance between Markers distance_between_markers text
  • Track GPS pings during activity — when Yes, the app sends periodic GPS location updates while an activity is in progress. When No, no tracking happens during the activity.
  • Distance between Markers — the minimum distance the user must travel before a new GPS marker is recorded. A larger value records fewer, more spread-out points (less data, coarser trail); a smaller value records a denser trail. This only has an effect when GPS pings are on. The setting’s label carries no unit; enter a plain number and confirm the spacing you get against a test run.

Keep in mind that GPS tracking draws on device battery and data — turn it on only for apps that genuinely need the trail.


Step 4 — Optional: auto-close an activity when the user is moving too fast

For activities that shouldn’t continue while someone is driving (for example, a walking route or an on-foot task), the app can prompt to end the activity once the user’s speed crosses a threshold.

Setting (UI label) Variable Type
Request close at max velocity request_close_activity_at_mph yes / no
Trigger close at speed (MPH) close_activity_at_mph text (MPH)
  • Request close at max velocity — when Yes, the app prompts the user to end the in-progress activity once their measured speed exceeds the threshold.
  • Trigger close at speed (MPH) — the speed, in MPH, that triggers that prompt.

Leave Request close at max velocity off if speed is irrelevant to your activities.


Step 5 — Optional: tidy the activity map

Two related display settings affect how distance shows up while the activity is running.

Setting (UI label) Variable Type
Hide distance on map? activity_hide_distance_on_map yes / no

When Yes, the distance-to-location readout is hidden on the activity map. Turn this on if showing the distance would only confuse or clutter things for your users.


Verify it

  1. Save the App Settings page and rebuild/refresh your app preview.
  2. Open an activity at a location with known coordinates.
  3. Distance gate: with a small value in Allowable Distance for Check in, try to check in from far away (or simulate a distant GPS location). Check-in should be blocked unless override is on.
  4. Override: with override Yes, the block should become a prompt using your custom title/message; confirming proceeds with check-in.
  5. GPS tracking: with pings Yes, start an activity, move around, and confirm location markers are being recorded at roughly your Distance between Markers spacing.

How it fits together

  • Check-in distance (distance_for_check_in) and override (distance_for_check_in_override, plus the override title/message) decide whether a user is allowed to check in at a location.
  • GPS tracking (send_gps_pings_on_activities, distance_between_markers) decides what the app records while the activity is running — independent of the distance gate.
  • Speed close (request_close_activity_at_mph, close_activity_at_mph) and map display (activity_hide_distance_on_map) are convenience behaviors layered on top.

Feel free to mix and match. A common setup: a tight check-in radius with override on (so honest users aren’t stuck on bad GPS), GPS pings on with a sensible marker distance for a proof-of-work trail, and speed-close off.


These live in the same group and often get tuned right alongside the location settings:

  • Use Start Form When Starting Activity (activity_use_start_form)
  • Use Dialog when Ending Activity (activity_use_end_dialog)
  • Require signature for activities at each location? (activity_combine_signatures_for_location)
  • Use color bar to show In Progress items? (activity_use_color_bar_for_in_progress)
  • Reload activities every five minutes (reload_activities_on_timer)
  • Include refresh button on tab bar? (listing_show_refresh_button)

Verification

This article was drafted against:

  • mam-main/includes/app-settings/admin-settings-page.php — the Activity settings group, including distance_for_check_in, distance_for_check_in_override, activity_override_start_title, activity_override_start_message, send_gps_pings_on_activities, distance_between_markers, request_close_activity_at_mph, close_activity_at_mph, and activity_hide_distance_on_map, and the Activity category label.
  • mam-main/includes/content-classes/local-app-enable-location-services-content-class.php — the open_location_services content type (content type label “Enable Location Services”).

Re-verify whenever any Activity-group setting variable, label, or type changes, or when the in-app behavior of the distance check, override prompt, or GPS tracking changes.

Was this article helpful?
Contents

    Need Support?

    Can't find the answer you're looking for? Don't worry we're here to help!