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
FOSS build asks once before loading camera locations from OpenStreetMap; nothing is fetched until allowed
CIS-C06641fecbe572
diff --git a/app/src/main/java/com/rfsentinel/app/MainActivity.kt b/app/src/main/java/com/rfsentinel/app/MainActivity.ktindex 140d30f..9c72c6e 100644--- a/app/src/main/java/com/rfsentinel/app/MainActivity.kt+++ b/app/src/main/java/com/rfsentinel/app/MainActivity.kt@@ -287,7 +287,10 @@ class MainActivity : AppCompatActivity() {}updateStatus()// Every time the app comes to the front (this screen can stay alive for days): Settings > Check for updates on app open.- if (Prefs.onboardingDone(this)) com.rfsentinel.app.util.UpdateChecker.checkOnStartup(this)+ // The FOSS build first asks whether it may fetch the known cameras on its own.+ if (Prefs.onboardingDone(this)) com.rfsentinel.app.util.CameraQuestion.askIfNeeded(this) {+ com.rfsentinel.app.util.UpdateChecker.checkOnStartup(this)+ }}diff --git a/app/src/main/java/com/rfsentinel/app/settings/SettingsActivity.kt b/app/src/main/java/com/rfsentinel/app/settings/SettingsActivity.ktindex 7e80bc3..4cba17f 100644--- a/app/src/main/java/com/rfsentinel/app/settings/SettingsActivity.kt+++ b/app/src/main/java/com/rfsentinel/app/settings/SettingsActivity.kt@@ -2547,6 +2547,7 @@ class SettingsActivity : AppCompatActivity() {Prefs.setKnownAlprAlerts(this, binding.knownAlprSwitch.isChecked)Prefs.setCellChangeAlerts(this, binding.cellChangeSwitch.isChecked)Prefs.setSpeedCameraAlerts(this, binding.speedCameraSwitch.isChecked)+ if (binding.autoCamerasSwitch.isChecked != Prefs.autoCameras(this)) Prefs.setCamerasAsked(this, true)Prefs.setAutoCameras(this, binding.autoCamerasSwitch.isChecked)// Turning the check on or off here answers the one-time question too.if (binding.autoUpdateSwitch.isChecked != Prefs.autoUpdateCheck(this)) Prefs.setUpdateCheckAsked(this, true)diff --git a/app/src/main/java/com/rfsentinel/app/ui/SetupActivity.kt b/app/src/main/java/com/rfsentinel/app/ui/SetupActivity.ktindex bfe8d40..a47f10a 100644--- a/app/src/main/java/com/rfsentinel/app/ui/SetupActivity.kt+++ b/app/src/main/java/com/rfsentinel/app/ui/SetupActivity.kt@@ -133,7 +133,8 @@ class SetupActivity : AppCompatActivity() {header("Welcome to RF Sentinel", "A quick setup - about a minute. You can change everything later in Settings.")para("RF Sentinel listens - passively - to the Bluetooth and WiFi signals devices around you already broadcast, and flags equipment such as body cameras, license-plate cameras, drones, trackers following you and camera glasses.")bullet("It never transmits to, connects to or interferes with any device.")- bullet("Scans, detections and history stay on this phone. Internet is only used for OpenStreetMap maps (including known plate, speed and red-light camera locations for the area you look at - can be turned off in Settings - and destination search and routes when you navigate, on the phone or in Android Auto) and GitHub when you check for updates. Police aircraft and Waze reports are optional online sources, off until you turn them on in Settings.")+ val cameras = if (com.rfsentinel.app.BuildConfig.FLAVOR == "foss") "only once you allow it" else "can be turned off in Settings"+ bullet("Scans, detections and history stay on this phone. Internet is only used for OpenStreetMap maps (including known plate, speed and red-light camera locations for the area you look at - $cameras - and destination search and routes when you navigate, on the phone or in Android Auto) and GitHub when you check for updates. Police aircraft and Waze reports are optional online sources, off until you turn them on in Settings.")bullet("A match means a device with that signature is nearby - not proof of who is there.")para("Check your local laws before use. This is not legal advice.", small = true)}diff --git a/app/src/main/java/com/rfsentinel/app/util/CameraQuestion.kt b/app/src/main/java/com/rfsentinel/app/util/CameraQuestion.ktnew file mode 100644index 0000000..1115f6c--- /dev/null+++ b/app/src/main/java/com/rfsentinel/app/util/CameraQuestion.kt@@ -0,0 +1,36 @@+package com.rfsentinel.app.util++import androidx.appcompat.app.AppCompatActivity+import com.google.android.material.dialog.MaterialAlertDialogBuilder+import com.rfsentinel.app.BuildConfig++/**+ * The FOSS (F-Droid) build asks once before it fetches the known cameras from OpenStreetMap on its own; until+ * then it fetches nothing. The full build keeps the Settings switch's default (on).+ */+object CameraQuestion {++ @Volatile private var asking = false++ /** Shows the question when it's still open; [then] runs once it's answered (or right away when nothing to ask). */+ fun askIfNeeded(activity: AppCompatActivity, then: () -> Unit) {+ if (BuildConfig.FLAVOR != "foss" || Prefs.camerasAsked(activity)) { then(); return }+ if (asking || activity.isFinishing || activity.isDestroyed) return+ asking = true+ fun answer(yes: Boolean) {+ Prefs.setAutoCameras(activity, yes)+ Prefs.setCamerasAsked(activity, true)+ }+ MaterialAlertDialogBuilder(activity)+ .setTitle("Load camera locations?")+ .setMessage("RF Sentinel can download the plate-reader, speed and red-light cameras mapped in OpenStreetMap " ++ "for the area the map shows and the route you drive, to warn you before them. OpenStreetMap's servers " ++ "see your IP address and that area; nothing about your scans is sent.\n\nWithout it, nothing is " ++ "downloaded on its own.\n\nYou can change this any time in Settings.")+ .setPositiveButton("Load cameras") { _, _ -> answer(true); then() }+ .setNegativeButton("Don't load") { _, _ -> answer(false); then() }+ .setCancelable(false)+ .setOnDismissListener { asking = false }+ .show()+ }+}diff --git a/app/src/main/java/com/rfsentinel/app/util/Prefs.kt b/app/src/main/java/com/rfsentinel/app/util/Prefs.ktindex 8273ade..3167e3a 100644--- a/app/src/main/java/com/rfsentinel/app/util/Prefs.kt+++ b/app/src/main/java/com/rfsentinel/app/util/Prefs.kt@@ -251,7 +251,12 @@ object Prefs {fun cameraRadiusKm(context: Context): Int = int(context, "camera_radius_km", 100).coerceIn(10, 200)fun setCameraRadiusKm(context: Context, km: Int) = setInt(context, "camera_radius_km", km.coerceIn(10, 200))- fun autoCameras(context: Context): Boolean = bool(context, "auto_cameras", true)+ /** Fetch the known cameras for the area in view. The FOSS (F-Droid) build fetches nothing until you've said yes. */+ fun autoCameras(context: Context): Boolean =+ bool(context, "auto_cameras", true) && (com.rfsentinel.app.BuildConfig.FLAVOR != "foss" || camerasAsked(context))+ /** Whether the FOSS build asked (once) if it may fetch the known cameras on its own. */+ fun camerasAsked(context: Context): Boolean = bool(context, "cameras_asked", false)+ fun setCamerasAsked(context: Context, value: Boolean) = setBool(context, "cameras_asked", value)fun setAutoCameras(context: Context, value: Boolean) = setBool(context, "auto_cameras", value)/** Check GitHub for a new release when the app opens. Off by default: it contacts GitHub. */diff --git a/fastlane/metadata/android/en-US/changelogs/62.txt b/fastlane/metadata/android/en-US/changelogs/62.txtindex 2ceeea5..97d0c0c 100644--- a/fastlane/metadata/android/en-US/changelogs/62.txt+++ b/fastlane/metadata/android/en-US/changelogs/62.txt@@ -1 +1,3 @@-• On first start RF Sentinel asks once whether it may check GitHub for updates when it opens, and respects your answer. It never checks before you answer; change it any time in Settings.+• On first start RF Sentinel asks once whether it may check GitHub for updates when it opens. It never checks before you answer.+• It also asks before loading camera locations from OpenStreetMap; nothing is downloaded until you allow it.+• Change either any time in Settings.