RF Sentinel (RFSentinel): free, open-source police detector app for Android. Spots police body cams, Flock ALPR cameras, AirTag trackers, Remote ID drones, smart glasses and fake cell towers from Bluetooth LE and WiFi. No root.
Kotlin airtagalprandroidandroid-autoanti-surveillancebluetooth-low-energybody-cameracounter-surveillancedrone-detectionflock-safetyimsi-catcher-detectorpolice-detectorpolice-scannerprivacyremote-idrtl-sdrsdrsurveillance-detectiontracker-detectionwifi
List and radar: ordinary devices leave 30 s (Bluetooth) / two scan rounds (WiFi) after they're last heard; flagged, favourite and following keep 3 minutes
CIS-C025aa669f2305
diff --git a/app/src/main/java/com/rfsentinel/app/MainActivity.kt b/app/src/main/java/com/rfsentinel/app/MainActivity.ktindex e566db1..82dd633 100644--- a/app/src/main/java/com/rfsentinel/app/MainActivity.kt+++ b/app/src/main/java/com/rfsentinel/app/MainActivity.kt@@ -304,7 +304,11 @@ class MainActivity : AppCompatActivity() {private fun render() {val now = System.currentTimeMillis()- val all = DeviceRegistry.snapshot(now)+ // Ordinary devices leave the list and radar soon after they're out of range (LiveWindow).+ val scanInterval = Prefs.scanIntervalMs(this)+ val all = DeviceRegistry.snapshot(now).filter {+ com.rfsentinel.app.ui.LiveWindow.keep(it, it.best != null && !WhitelistCache.contains(it.mac), now, scanInterval)+ }val threshold = Prefs.alertThreshold(this)deviceCount = all.sizeval flagged = all.filter { it.best != null && !WhitelistCache.contains(it.mac) }diff --git a/app/src/main/java/com/rfsentinel/app/ui/LiveWindow.kt b/app/src/main/java/com/rfsentinel/app/ui/LiveWindow.ktnew file mode 100644index 0000000..79267ee--- /dev/null+++ b/app/src/main/java/com/rfsentinel/app/ui/LiveWindow.kt@@ -0,0 +1,22 @@+package com.rfsentinel.app.ui++import com.rfsentinel.app.detect.Advert+import com.rfsentinel.app.service.DeviceRegistry++/**+ * How long a device stays in the live list and radar after it was last heard. Ordinary+ * devices leave quickly once out of range; flagged, favourite and following ones stay for+ * the registry's full 3 minutes so a passing threat doesn't vanish between sightings.+ */+object LiveWindow {+ /** Bluetooth devices advertise several times a second: 30 s of silence means gone. */+ const val BLE_MS = 30_000L+ /** WiFi is only seen on each scan: allow two scan rounds plus a margin, at least 60 s. */+ fun wifiMs(scanIntervalMs: Long): Long = maxOf(60_000L, 2 * scanIntervalMs + 10_000L)++ fun keep(s: DeviceRegistry.Snapshot, important: Boolean, now: Long, scanIntervalMs: Long): Boolean {+ if (important || s.following || s.known?.favorite == true) return true+ val window = if (Advert.Source.WIFI in s.sources || s.source == Advert.Source.WIFI) wifiMs(scanIntervalMs) else BLE_MS+ return now - s.lastSeen <= window+ }+}