Skip to content

Colota - Android GPS Location tracker

docs(profiles): cover the Bluetooth device condition in the guides (#981)

Max Dietrich44d17091f3f3
diff --git a/apps/docs/docs/development/architecture.md b/apps/docs/docs/development/architecture.md
index fee26ab3..9e2757a9 100644
--- a/apps/docs/docs/development/architecture.md
+++ b/apps/docs/docs/development/architecture.md
@@ -254,7 +254,7 @@ When both WiFi and motionless pause are enabled, GPS only resumes when both cond
### ProfileManager
-Evaluates tracking profile conditions and switches GPS settings automatically. Supports seven condition types: charging, Android Auto / car mode, Wi-Fi (any network), Wi-Fi network (named SSID), speed above threshold, speed below threshold, and stationary. Uses a rolling speed buffer for averaged speed readings, deactivation delays (hysteresis) to prevent rapid toggling, and priority-based resolution when multiple profiles match.
+Evaluates tracking profile conditions and switches GPS settings automatically. Supports eight condition types: charging, Android Auto / car mode, Bluetooth device, Wi-Fi (any network), Wi-Fi network (named SSID), speed above threshold, speed below threshold and stationary. Uses a rolling speed buffer for averaged speed readings, deactivation delays (hysteresis) to prevent rapid toggling, and priority-based resolution when multiple profiles match.
The stationary condition is decided by the fixes and never by a timer. `evaluateStationaryState` tracks a run of consecutive fixes below 0.3 m/s and the verdict is reached by the fix that completes the window, so a stream that stops delivering cannot produce one. A gap restarts the run unless it is within three times the previous gap, or 60 seconds if that is larger, and no gap over 15 minutes is ever tolerated. Calibrating on the previous gap keeps a sparse Doze cadence usable while a fast stream that goes quiet is treated as unobserved time rather than stillness; the window length deliberately plays no part, or a long window would license a long blackout. The motion sensor discards a run in progress as well as an active verdict.
@@ -264,7 +264,7 @@ Database access layer for tracking profiles and trip events. Maintains a `TimedC
### ConditionMonitor
-Monitors charging state via `BroadcastReceiver`, Android Auto connection via the `CarConnection` API, Bluetooth device connections via the ACL `BroadcastReceiver` (seeded once from the A2DP and headset profile proxies, since ACL broadcasts report changes only), and Wi-Fi transport changes from `NetworkManager`, reading the network name one-shot when a named-network profile needs it: on every Wi-Fi network that comes or goes and when Location comes back on, because a name read while Location was off is blank. Forwards state changes to `ProfileManager` for condition evaluation.
+Monitors charging state via `BroadcastReceiver`, Android Auto connection via the `CarConnection` API, Bluetooth device connections via the ACL `BroadcastReceiver` (seeded from the A2DP and headset profile proxies on every monitor start, since ACL broadcasts report changes only; a device on neither profile is seen at its next connect), and Wi-Fi transport changes from `NetworkManager`, reading the network name one-shot when a named-network profile needs it: on every Wi-Fi network that comes or goes and when Location comes back on, because a name read while Location was off is blank. Forwards state changes to `ProfileManager` for condition evaluation.
### ProfileConstants
diff --git a/apps/docs/docs/guides/deep-link-setup.md b/apps/docs/docs/guides/deep-link-setup.md
index 741b1249..3774a633 100644
--- a/apps/docs/docs/guides/deep-link-setup.md
+++ b/apps/docs/docs/guides/deep-link-setup.md
@@ -114,7 +114,7 @@ Each entry in the `profiles` array describes one [tracking profile](tracking-pro
Imported profiles are appended by default. When both profiles and geofences are present the same "Replace ... with the same name" toggle on the import screen also deletes existing profiles whose names match before creating the incoming ones.
-You can build links with profiles using the in-browser generator above, the Node.js or Python snippets below, or by sharing profiles directly from the Tracking profiles screen in the app.
+You can build links with profiles using the in-browser generator above, the Node.js or Python snippets below, or by sharing profiles directly from the Tracking profiles screen in the app. The generator has no Bluetooth device condition, because the profile needs the device's address; share those profiles from the app.
## Generating Links Programmatically
diff --git a/apps/docs/docs/guides/tracking-profiles.md b/apps/docs/docs/guides/tracking-profiles.md
index 19f3e626..9d4d521b 100644
--- a/apps/docs/docs/guides/tracking-profiles.md
+++ b/apps/docs/docs/guides/tracking-profiles.md
@@ -143,4 +143,4 @@ When a profile is active, Colota shows it in three places:
All of them clear when the profile deactivates (after the deactivation delay) or when tracking stops.
-A blank name saves as the condition's name, so two untouched charging profiles are both called "Charging"; a setup link import replaces a profile by name, so give profiles you share distinct names. Sharing a **Wi-Fi network** profile also shares the network name it watches, and sharing a **Bluetooth device** profile shares the device's name and address. A shared Bluetooth profile only matches on a phone paired with that same device.
+A blank name saves as the condition's name, so two untouched charging profiles are both called "Charging"; a setup link import replaces a profile by name, so give profiles you share distinct names. Sharing a **Wi-Fi network** profile also shares the network name it watches, and sharing a **Bluetooth device** profile shares the device's name and address. A shared Bluetooth profile only matches on a phone paired with that same device and with Nearby devices allowed.