Skip to content

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.

UK and Portugal presets (Motorola / Axon body cams, Sepura and Motorola Airwave radios, Jenoptik ANPR; Motorola SIRESP radios), Portugal driving notice, weak Flock clues off in non-Flock regions; start beep switch (off by default)

CIS-C0847a04450a80
diff --git a/README.md b/README.md
index 28daacc..a656335 100644
--- a/README.md
+++ b/README.md
@@ -116,7 +116,7 @@ headline as you get closer (strong within 50 m, fading out by 500 m). Full refer
- **Fake cell tower signs** checked every 15 s, with persistence, call and border suppression (modelled on [EFF's Rayhunter](https://github.com/EFForg/rayhunter) as far as Android allows without root)
- **Hidden WiFi networks** identified from WPS data, Cisco AP names and vendor elements, and linked to the visible network on the same router
- Ordinary devices named precisely: exact AirPods / Beats model, device class, IEEE registrant; decoded Apple Continuity, iBeacon, Eddystone, Fast Pair
-- Editable **watchlist** (exact addresses, prefixes, name / vendor rules) with Global, Canada, US and France presets; per-category on/off switches
+- Editable **watchlist** (exact addresses, prefixes, name / vendor rules) with Global, Canada, US, France, UK and Portugal presets; per-category on/off switches
- Bluetooth 5 extended advertising and LE Coded (long range) where the phone supports it
**Known cameras**
diff --git a/app/src/main/assets/oui_presets/portugal.json b/app/src/main/assets/oui_presets/portugal.json
new file mode 100644
index 0000000..88c3b54
--- /dev/null
+++ b/app/src/main/assets/oui_presets/portugal.json
@@ -0,0 +1,74 @@
+[
+ {
+ "prefix": "4C:CC:34",
+ "label": "Motorola Solutions - in Portugal: SIRESP TETRA network and radios of PSP, GNR, Policia Judiciaria and INEM",
+ "source": "IEEE MA-L registry; Motorola built and runs the SIRESP network; PSP and GNR received 17,000 new portable radios. Weak: the same blocks carry radios and other gear",
+ "confidence": "candidate",
+ "score": 50,
+ "category": "PUBLIC_SAFETY"
+ },
+ {
+ "prefix": "00:1F:92",
+ "label": "Motorola Solutions - in Portugal: SIRESP TETRA network and radios of PSP, GNR, Policia Judiciaria and INEM",
+ "source": "IEEE MA-L registry; Motorola built and runs the SIRESP network; PSP and GNR received 17,000 new portable radios. Weak: the same blocks carry radios and other gear",
+ "confidence": "candidate",
+ "score": 50,
+ "category": "PUBLIC_SAFETY"
+ },
+ {
+ "prefix": "00:18:85",
+ "label": "Motorola Solutions - in Portugal: SIRESP TETRA network and radios of PSP, GNR, Policia Judiciaria and INEM",
+ "source": "IEEE MA-L registry; Motorola built and runs the SIRESP network; PSP and GNR received 17,000 new portable radios. Weak: the same blocks carry radios and other gear",
+ "confidence": "candidate",
+ "score": 50,
+ "category": "PUBLIC_SAFETY"
+ },
+ {
+ "prefix": "00:04:7D",
+ "label": "Motorola Solutions - in Portugal: SIRESP TETRA network and radios of PSP, GNR, Policia Judiciaria and INEM",
+ "source": "IEEE MA-L registry; Motorola built and runs the SIRESP network; PSP and GNR received 17,000 new portable radios. Weak: the same blocks carry radios and other gear",
+ "confidence": "candidate",
+ "score": 50,
+ "category": "PUBLIC_SAFETY"
+ },
+ {
+ "prefix": "10:74:6F",
+ "label": "Motorola Solutions - in Portugal: SIRESP TETRA network and radios of PSP, GNR, Policia Judiciaria and INEM",
+ "source": "IEEE MA-L registry; Motorola built and runs the SIRESP network; PSP and GNR received 17,000 new portable radios. Weak: the same blocks carry radios and other gear",
+ "confidence": "candidate",
+ "score": 50,
+ "category": "PUBLIC_SAFETY"
+ },
+ {
+ "prefix": "B8:E2:8C",
+ "label": "Motorola Solutions - in Portugal: SIRESP TETRA network and radios of PSP, GNR, Policia Judiciaria and INEM",
+ "source": "IEEE MA-L registry; Motorola built and runs the SIRESP network; PSP and GNR received 17,000 new portable radios. Weak: the same blocks carry radios and other gear",
+ "confidence": "candidate",
+ "score": 50,
+ "category": "PUBLIC_SAFETY"
+ },
+ {
+ "prefix": "9C:86:2B",
+ "label": "Motorola Solutions - in Portugal: SIRESP TETRA network and radios of PSP, GNR, Policia Judiciaria and INEM",
+ "source": "IEEE MA-L registry; Motorola built and runs the SIRESP network; PSP and GNR received 17,000 new portable radios. Weak: the same blocks carry radios and other gear",
+ "confidence": "candidate",
+ "score": 50,
+ "category": "PUBLIC_SAFETY"
+ },
+ {
+ "prefix": "00:25:DF",
+ "label": "Axon (body cam / TASER)",
+ "source": "IEEE MA-L registry (Axon Enterprise). PSP / GNR body cams are being bought in 2026 (supplier not yet public)",
+ "confidence": "confirmed",
+ "score": 75,
+ "category": "BODY_CAM"
+ },
+ {
+ "prefix": "00:04:18",
+ "label": "Teltronic (TETRA radios, used by Iberian public-safety networks)",
+ "source": "IEEE MA-L registry (Teltronic S.A.U.). Weak: not confirmed on SIRESP",
+ "confidence": "candidate",
+ "score": 45,
+ "category": "PUBLIC_SAFETY"
+ }
+]
\ No newline at end of file
diff --git a/app/src/main/assets/oui_presets/uk.json b/app/src/main/assets/oui_presets/uk.json
new file mode 100644
index 0000000..0b1ce2d
--- /dev/null
+++ b/app/src/main/assets/oui_presets/uk.json
@@ -0,0 +1,90 @@
+[
+ {
+ "prefix": "4C:CC:34",
+ "label": "Motorola Solutions - in the UK: VB400 / VB300 body cams (Police Scotland ~10,500 VB400; national body-worn video framework 2025) and Airwave TETRA radios",
+ "source": "IEEE MA-L registry; Police Scotland contract (May 2024) and the 2025 national BWV framework (Axon, Motorola, Reveal Media). Weak: the same blocks carry radios and other gear",
+ "confidence": "candidate",
+ "score": 50,
+ "category": "PUBLIC_SAFETY"
+ },
+ {
+ "prefix": "00:1F:92",
+ "label": "Motorola Solutions - in the UK: VB400 / VB300 body cams (Police Scotland ~10,500 VB400; national body-worn video framework 2025) and Airwave TETRA radios",
+ "source": "IEEE MA-L registry; Police Scotland contract (May 2024) and the 2025 national BWV framework (Axon, Motorola, Reveal Media). Weak: the same blocks carry radios and other gear",
+ "confidence": "candidate",
+ "score": 50,
+ "category": "PUBLIC_SAFETY"
+ },
+ {
+ "prefix": "00:18:85",
+ "label": "Motorola Solutions - in the UK: VB400 / VB300 body cams (Police Scotland ~10,500 VB400; national body-worn video framework 2025) and Airwave TETRA radios",
+ "source": "IEEE MA-L registry; Police Scotland contract (May 2024) and the 2025 national BWV framework (Axon, Motorola, Reveal Media). Weak: the same blocks carry radios and other gear",
+ "confidence": "candidate",
+ "score": 50,
+ "category": "PUBLIC_SAFETY"
+ },
+ {
+ "prefix": "00:04:7D",
+ "label": "Motorola Solutions - in the UK: VB400 / VB300 body cams (Police Scotland ~10,500 VB400; national body-worn video framework 2025) and Airwave TETRA radios",
+ "source": "IEEE MA-L registry; Police Scotland contract (May 2024) and the 2025 national BWV framework (Axon, Motorola, Reveal Media). Weak: the same blocks carry radios and other gear",
+ "confidence": "candidate",
+ "score": 50,
+ "category": "PUBLIC_SAFETY"
+ },
+ {
+ "prefix": "10:74:6F",
+ "label": "Motorola Solutions - in the UK: VB400 / VB300 body cams (Police Scotland ~10,500 VB400; national body-worn video framework 2025) and Airwave TETRA radios",
+ "source": "IEEE MA-L registry; Police Scotland contract (May 2024) and the 2025 national BWV framework (Axon, Motorola, Reveal Media). Weak: the same blocks carry radios and other gear",
+ "confidence": "candidate",
+ "score": 50,
+ "category": "PUBLIC_SAFETY"
+ },
+ {
+ "prefix": "B8:E2:8C",
+ "label": "Motorola Solutions - in the UK: VB400 / VB300 body cams (Police Scotland ~10,500 VB400; national body-worn video framework 2025) and Airwave TETRA radios",
+ "source": "IEEE MA-L registry; Police Scotland contract (May 2024) and the 2025 national BWV framework (Axon, Motorola, Reveal Media). Weak: the same blocks carry radios and other gear",
+ "confidence": "candidate",
+ "score": 50,
+ "category": "PUBLIC_SAFETY"
+ },
+ {
+ "prefix": "9C:86:2B",
+ "label": "Motorola Solutions - in the UK: VB400 / VB300 body cams (Police Scotland ~10,500 VB400; national body-worn video framework 2025) and Airwave TETRA radios",
+ "source": "IEEE MA-L registry; Police Scotland contract (May 2024) and the 2025 national BWV framework (Axon, Motorola, Reveal Media). Weak: the same blocks carry radios and other gear",
+ "confidence": "candidate",
+ "score": 50,
+ "category": "PUBLIC_SAFETY"
+ },
+ {
+ "prefix": "00:25:DF",
+ "label": "Axon (body cams and TASER of many UK police forces; national body-worn video framework 2025)",
+ "source": "IEEE MA-L registry (Axon Enterprise); UK national BWV / in-vehicle video framework awarded April 2025",
+ "confidence": "confirmed",
+ "score": 75,
+ "category": "BODY_CAM"
+ },
+ {
+ "prefix": "00:1E:96",
+ "label": "Sepura (UK TETRA radio maker: SC20 / SC21 radios on the Airwave police network)",
+ "source": "IEEE MA-L registry (Sepura Limited); Sepura SC20 approved for Airwave. Weak: also transport and utilities",
+ "confidence": "candidate",
+ "score": 55,
+ "category": "PUBLIC_SAFETY"
+ },
+ {
+ "prefix": "00:04:4C",
+ "label": "Jenoptik (SPECS average-speed and VECTOR ANPR cameras, common on UK roads)",
+ "source": "IEEE MA-L registry (Jenoptik); SPECS3 / SPECS3 VECTOR are Home Office type-approved",
+ "confidence": "candidate",
+ "score": 55,
+ "category": "ALPR"
+ },
+ {
+ "prefix": "48:E3:C3",
+ "label": "Jenoptik Advanced Systems (SPECS / VECTOR ANPR and speed cameras)",
+ "source": "IEEE MA-L registry (JENOPTIK Advanced Systems GmbH); Home Office type-approved enforcement cameras",
+ "confidence": "candidate",
+ "score": 55,
+ "category": "ALPR"
+ }
+]
\ No newline at end of file
diff --git a/app/src/main/java/com/rfsentinel/app/detect/FlockNoise.kt b/app/src/main/java/com/rfsentinel/app/detect/FlockNoise.kt
index 0d6ac95..d812428 100644
--- a/app/src/main/java/com/rfsentinel/app/detect/FlockNoise.kt
+++ b/app/src/main/java/com/rfsentinel/app/detect/FlockNoise.kt
@@ -6,7 +6,7 @@ package com.rfsentinel.app.detect
* generic "FS-<hex>" name are shared with speakers, scooters, bulbs and meeting-room boxes:
* - a module-prefix match is dropped when the device names itself as something else
* (a Flock module has no name or a Flock-style one);
- * - outside Flock's market (France preset on, US and Canada off) both are dropped entirely.
+ * - outside Flock's market (France, UK or Portugal preset on, US and Canada off) both are dropped entirely.
* Strong Flock signatures (Penguin / Falcon / Raven names, Flock's own service, the
* battery name, XUNTONG ID) are never touched.
*/
diff --git a/app/src/main/java/com/rfsentinel/app/oui/OuiWatchlist.kt b/app/src/main/java/com/rfsentinel/app/oui/OuiWatchlist.kt
index 1e16420..73675ef 100644
--- a/app/src/main/java/com/rfsentinel/app/oui/OuiWatchlist.kt
+++ b/app/src/main/java/com/rfsentinel/app/oui/OuiWatchlist.kt
@@ -40,7 +40,7 @@ object OuiWatchlist {
)
/**
- * False when only the France preset is on among the regional ones (no US / Canada): Flock
+ * False when a non-Flock region (France, UK, Portugal) is on without US / Canada: Flock
* isn't deployed there, so its weak module-prefix clues are ignored (see FlockNoise).
*/
@Volatile
@@ -56,13 +56,16 @@ object OuiWatchlist {
private var state = State(emptyMap(), emptyList(), emptyList(), emptyMap(), emptyMap(), emptyList())
/** Load order: regional presets after "global", so their labels win for shared prefixes. */
- val availablePresets = listOf("global", "canada", "us", "france")
+ val availablePresets = listOf("global", "canada", "us", "france", "uk", "portugal")
+
+ /** Regions where Flock isn't deployed: their presets turn the weak Flock clues off (FlockNoise). */
+ private val NON_FLOCK_REGIONS = setOf("france", "uk", "portugal")
@Synchronized
fun load(context: Context) {
val byKey = linkedMapOf<String, OuiEntry>()
val enabled = getEnabledPresets(context)
- flockRegion = "france" !in enabled || "us" in enabled || "canada" in enabled
+ flockRegion = enabled.none { it in NON_FLOCK_REGIONS } || "us" in enabled || "canada" in enabled
for (preset in availablePresets.filter { it in enabled }) {
loadPresetAsset(context, preset).forEach { byKey[it.prefix] = it }
}
diff --git a/app/src/main/java/com/rfsentinel/app/settings/SettingsActivity.kt b/app/src/main/java/com/rfsentinel/app/settings/SettingsActivity.kt
index 9d70c0c..adb42c5 100644
--- a/app/src/main/java/com/rfsentinel/app/settings/SettingsActivity.kt
+++ b/app/src/main/java/com/rfsentinel/app/settings/SettingsActivity.kt
@@ -318,8 +318,11 @@ class SettingsActivity : AppCompatActivity() {
"• Canada: Axon, Cyberkar, Getac, Genetec, Motorola, ticket printers...\n" +
"• United States\n" +
"• France: Motorola VB400 body cams (Police nationale, Gendarmerie), Zepcam, Axon, TETRAPOL radios, Idemia. " +
- "French drone electronic IDs are decoded in every region. With France on (and not US / Canada), " +
- "the weak Flock clues are ignored: Flock isn't used in France."),
+ "• United Kingdom: Motorola VB400 / VB300 and Axon body cams, Sepura and Motorola Airwave radios, " +
+ "Jenoptik SPECS / VECTOR ANPR and speed cameras.\n" +
+ "• Portugal: Motorola SIRESP radios of PSP, GNR and INEM; PSP / GNR body cams are still being bought.\n" +
+ "French drone electronic IDs are decoded in every region. With France, UK or Portugal on (and not US / Canada), " +
+ "the weak Flock clues are ignored: Flock isn't used there."),
Section("alerts", binding.headerAlerts, binding.sectionAlerts,
"Threshold: \"Weak\" alerts on every match (more false alarms); \"Strong only\" on near-certain ones.\n\n" +
"Vibration: 1 pulse weak, 2 probable, 3 strong.\n\n" +
@@ -328,7 +331,7 @@ class SettingsActivity : AppCompatActivity() {
"Radar-detector sound (off by default): radar-detector alert sounds instead of the plain beeps - " +
"by strength (effect 1 strong, 2 probable, 3 weak, 4 following) or always the effect you pick - then " +
"the short voice says what it is (\"Body cam\"); the proximity beeps use a pulse of the same effect. " +
- "A power-on sweep when a scan starts, and \"GPS connected\" when the GPS locks.\n\n" +
+ "\"GPS connected\" when the GPS locks; optional start beep (power-on sweep) when a scan starts, off by default.\n\n" +
"Intro sound (off by default): plays when a scan starts.\n\n" +
"Re-alert: how long before the same device can alert again."),
Section("voice", binding.headerVoice, binding.sectionVoice,
@@ -791,7 +794,10 @@ class SettingsActivity : AppCompatActivity() {
binding.presetCanada.isChecked = "canada" in enabledPresets
binding.presetUs.isChecked = "us" in enabledPresets
binding.presetFrance.isChecked = "france" in enabledPresets
- binding.presetFrance.setOnCheckedChangeListener { _, on -> if (on) com.rfsentinel.app.ui.FranceNotice.show(this) }
+ binding.presetFrance.setOnCheckedChangeListener { _, on -> if (on) com.rfsentinel.app.ui.RegionNotice.show(this, "france") }
+ binding.presetUk.isChecked = "uk" in enabledPresets
+ binding.presetPortugal.isChecked = "portugal" in enabledPresets
+ binding.presetPortugal.setOnCheckedChangeListener { _, on -> if (on) com.rfsentinel.app.ui.RegionNotice.show(this, "portugal") }
// Alerts
val threshold = Prefs.alertThreshold(this)
@@ -806,6 +812,7 @@ class SettingsActivity : AppCompatActivity() {
binding.vibrateSwitch.isChecked = Prefs.vibrateEnabled(this)
binding.radarBeepSwitch.isChecked = Prefs.radarBeep(this)
binding.detectorSoundSwitch.isChecked = Prefs.detectorSound(this)
+ binding.startupSweepSwitch.isChecked = Prefs.startupSweep(this)
binding.scanIntroSwitch.isChecked = Prefs.scanIntro(this)
updateDetectorEffectButton()
binding.detectorEffectButton.isEnabled = binding.detectorSoundSwitch.isChecked
@@ -1061,6 +1068,8 @@ class SettingsActivity : AppCompatActivity() {
if (binding.presetCanada.isChecked) presets.add("canada")
if (binding.presetUs.isChecked) presets.add("us")
if (binding.presetFrance.isChecked) presets.add("france")
+ if (binding.presetUk.isChecked) presets.add("uk")
+ if (binding.presetPortugal.isChecked) presets.add("portugal")
OuiWatchlist.setEnabledPresets(this, presets)
Prefs.setAlertThreshold(
@@ -1074,6 +1083,7 @@ class SettingsActivity : AppCompatActivity() {
Prefs.setSoundEnabled(this, binding.soundSwitch.isChecked)
Prefs.setRadarBeep(this, binding.radarBeepSwitch.isChecked)
Prefs.setDetectorSound(this, binding.detectorSoundSwitch.isChecked)
+ Prefs.setStartupSweep(this, binding.startupSweepSwitch.isChecked)
Prefs.setScanIntro(this, binding.scanIntroSwitch.isChecked)
Prefs.setVibrateEnabled(this, binding.vibrateSwitch.isChecked)
Prefs.setVoiceEnabled(this, binding.voiceSwitch.isChecked)
diff --git a/app/src/main/java/com/rfsentinel/app/ui/FranceNotice.kt b/app/src/main/java/com/rfsentinel/app/ui/FranceNotice.kt
deleted file mode 100644
index 6240fdf..0000000
--- a/app/src/main/java/com/rfsentinel/app/ui/FranceNotice.kt
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.rfsentinel.app.ui
-
-import android.content.Context
-import androidx.appcompat.app.AlertDialog
-
-/**
- * Shown when the France preset is switched on: French law bans radar detectors and any
- * device or app that signals speed cameras (Code de la route R413-15, décret 2012-3).
- */
-object FranceNotice {
-
- const val TEXT = "In France, radar detectors and devices or apps that signal the location of speed cameras " +
- "are illegal (Code de la route R413-15, décret n° 2012-3: €1,500 fine, 6 points, device seized). " +
- "Since 2021 the authorities can also require apps to hide police checks on given roads.\n\n" +
- "If you drive in France, turn off speed-camera and red-light camera warnings (Settings > Known cameras) " +
- "and Waze police reports, and don't use RF Sentinel to locate speed-enforcement equipment. " +
- "You are responsible for complying with the law."
-
- fun show(context: Context) {
- AlertDialog.Builder(context)
- .setTitle("Driving in France")
- .setMessage(TEXT)
- .setPositiveButton("I understand", null)
- .show()
- }
-}
diff --git a/app/src/main/java/com/rfsentinel/app/ui/RegionNotice.kt b/app/src/main/java/com/rfsentinel/app/ui/RegionNotice.kt
new file mode 100644
index 0000000..2f3db81
--- /dev/null
+++ b/app/src/main/java/com/rfsentinel/app/ui/RegionNotice.kt
@@ -0,0 +1,41 @@
+package com.rfsentinel.app.ui
+
+import android.content.Context
+import androidx.appcompat.app.AlertDialog
+
+/**
+ * Shown when a regional preset with driving rules worth knowing is switched on: France bans
+ * radar detectors and speed-camera warnings; Portugal bans radar detectors but allows
+ * camera-warning apps. The UK allows both (laser jammers aside), so it has no notice.
+ */
+object RegionNotice {
+
+ const val FRANCE = "In France, radar detectors and devices or apps that signal the location of speed cameras " +
+ "are illegal (Code de la route R413-15, décret n° 2012-3: €1,500 fine, 6 points, device seized). " +
+ "Since 2021 the authorities can also require apps to hide police checks on given roads.\n\n" +
+ "If you drive in France, turn off speed-camera and red-light camera warnings (Settings > Known cameras) " +
+ "and Waze police reports, and don't use RF Sentinel to locate speed-enforcement equipment. " +
+ "You are responsible for complying with the law."
+
+ const val PORTUGAL = "In Portugal, devices that detect or disturb speed radars are illegal (Código da Estrada, " +
+ "art. 84: €500 to €2,500 fine, device and vehicle papers seized). Apps that warn about known camera " +
+ "locations, like RF Sentinel's Known cameras, are allowed.\n\n" +
+ "RF Sentinel listens for Bluetooth and WiFi, not radar - but don't use it to hunt for speed-enforcement " +
+ "equipment while driving. You are responsible for complying with the law."
+
+ /** The notice for a preset key, or null when that region has none. */
+ fun textFor(preset: String): Pair<String, String>? = when (preset) {
+ "france" -> "Driving in France" to FRANCE
+ "portugal" -> "Driving in Portugal" to PORTUGAL
+ else -> null
+ }
+
+ fun show(context: Context, preset: String) {
+ val (title, text) = textFor(preset) ?: return
+ AlertDialog.Builder(context)
+ .setTitle(title)
+ .setMessage(text)
+ .setPositiveButton("I understand", null)
+ .show()
+ }
+}
diff --git a/app/src/main/java/com/rfsentinel/app/ui/SetupActivity.kt b/app/src/main/java/com/rfsentinel/app/ui/SetupActivity.kt
index d5d333a..86bdd25 100644
--- a/app/src/main/java/com/rfsentinel/app/ui/SetupActivity.kt
+++ b/app/src/main/java/com/rfsentinel/app/ui/SetupActivity.kt
@@ -159,11 +159,13 @@ class SetupActivity : AppCompatActivity() {
"global" to "Global - body cams (Axon, Zepcam, WatchGuard...), Flock, ShotSpotter, traffic cameras, radios",
"canada" to "Canada - adds Cyberkar in-car systems, Getac body cams, Genetec plate readers",
"us" to "United States",
- "france" to "France - Motorola VB400 body cams of the Police nationale and Gendarmerie, Zepcam, TETRAPOL radios"
+ "france" to "France - Motorola VB400 body cams of the Police nationale and Gendarmerie, Zepcam, TETRAPOL radios",
+ "uk" to "United Kingdom - Motorola and Axon body cams, Sepura / Motorola Airwave radios, Jenoptik ANPR cameras",
+ "portugal" to "Portugal - Motorola SIRESP radios of PSP, GNR and INEM"
).forEach { (key, label) ->
check(label, key in enabled) { on ->
if (on) enabled += key else enabled -= key
- if (on && key == "france") FranceNotice.show(this)
+ if (on) RegionNotice.show(this, key)
OuiWatchlist.setEnabledPresets(this, enabled)
}
}
diff --git a/app/src/main/java/com/rfsentinel/app/util/AlertPlayer.kt b/app/src/main/java/com/rfsentinel/app/util/AlertPlayer.kt
index 6753f6a..f00ce58 100644
--- a/app/src/main/java/com/rfsentinel/app/util/AlertPlayer.kt
+++ b/app/src/main/java/com/rfsentinel/app/util/AlertPlayer.kt
@@ -176,7 +176,8 @@ object AlertPlayer {
fun startup(context: Context) {
val inCar = CarState.connected
val intro = Prefs.scanIntro(context)
- if (!intro && !Prefs.detectorSound(context)) return
+ // The power-on sweep only with the detector sound style and its start beep on (off by default).
+ if (!intro && !(Prefs.detectorSound(context) && Prefs.startupSweep(context))) return
if (Prefs.alertsSilenced(context) || !Prefs.soundEnabled(context) || !(inCar || ringerAllowsSound(context))) return
val attrs = if (inCar) carToneAttributes else phoneToneAttributes
if (intro) SoundClips.playIntro(context, attrs) else Beeper.playTones(attrs, Beeper.detectorStartup)
diff --git a/app/src/main/java/com/rfsentinel/app/util/Prefs.kt b/app/src/main/java/com/rfsentinel/app/util/Prefs.kt
index 659c0a1..8a832ad 100644
--- a/app/src/main/java/com/rfsentinel/app/util/Prefs.kt
+++ b/app/src/main/java/com/rfsentinel/app/util/Prefs.kt
@@ -247,6 +247,10 @@ object Prefs {
fun detectorEffect(context: Context): Int = int(context, "detector_effect", 0).coerceIn(0, 4)
fun setDetectorEffect(context: Context, value: Int) = setInt(context, "detector_effect", value.coerceIn(0, 4))
+ /** Radar-detector sound style: the power-on sweep when a scan starts (off by default). */
+ fun startupSweep(context: Context): Boolean = bool(context, "startup_sweep", false)
+ fun setStartupSweep(context: Context, value: Boolean) = setBool(context, "startup_sweep", value)
+
/** Play the intro sound when a scan starts. */
fun scanIntro(context: Context): Boolean = bool(context, "scan_intro", false)
fun setScanIntro(context: Context, value: Boolean) = setBool(context, "scan_intro", value)
diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml
index c869caa..e4e8c2f 100644
--- a/app/src/main/res/layout/activity_settings.xml
+++ b/app/src/main/res/layout/activity_settings.xml
@@ -186,6 +186,8 @@
<CheckBox android:id="@+id/presetCanada" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Canada" />
<CheckBox android:id="@+id/presetUs" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="United States" />
<CheckBox android:id="@+id/presetFrance" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="France" />
+ <CheckBox android:id="@+id/presetUk" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="United Kingdom" />
+ <CheckBox android:id="@+id/presetPortugal" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Portugal" />
</LinearLayout>
<!-- ================= Alerts ================= -->
@@ -228,6 +230,13 @@
android:layout_height="wrap_content"
android:text="Radar-detector sound (Ka / K / X tones, GPS connected)" />
+ <com.google.android.material.switchmaterial.SwitchMaterial
+ android:id="@+id/startupSweepSwitch"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingStart="24dp"
+ android:text="Start beep when a scan starts" />
+
<Button
android:id="@+id/detectorEffectButton"
style="@style/Widget.MaterialComponents.Button.TextButton"
diff --git a/app/src/test/java/com/rfsentinel/app/ui/RegionNoticeTest.kt b/app/src/test/java/com/rfsentinel/app/ui/RegionNoticeTest.kt
new file mode 100644
index 0000000..22a9380
--- /dev/null
+++ b/app/src/test/java/com/rfsentinel/app/ui/RegionNoticeTest.kt
@@ -0,0 +1,23 @@
+package com.rfsentinel.app.ui
+
+import com.rfsentinel.app.oui.OuiWatchlist
+import org.junit.Assert.assertNotNull
+import org.junit.Assert.assertNull
+import org.junit.Assert.assertTrue
+import org.junit.Test
+
+class RegionNoticeTest {
+
+ @Test
+ fun noticesOnlyWhereTheLawRestrictsDetectors() {
+ assertNotNull(RegionNotice.textFor("france"))
+ assertTrue(RegionNotice.textFor("portugal")!!.second.contains("art. 84"))
+ assertNull(RegionNotice.textFor("uk"))
+ assertNull(RegionNotice.textFor("us"))
+ }
+
+ @Test
+ fun newRegionsAreAvailable() {
+ assertTrue(OuiWatchlist.availablePresets.containsAll(listOf("france", "uk", "portugal")))
+ }
+}