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-only builds never declare or contact the Mapbox server
CIS-C071dcce32dfd6
diff --git a/README.md b/README.mdindex 6f61d87..7efc7bb 100644--- a/README.md+++ b/README.md@@ -906,6 +906,8 @@ Requirements: Android Studio, or JDK 17+ with the Android SDK (platform 37).There are two flavors. **foss** contains only free software: no Mapbox SDK, the map isalways OpenFreeMap. **full** adds the optional Mapbox map (`./gradlew assembleFullDebug`).Both have the same app ID, so either one replaces the other.+A build of only foss tasks (or `-Prfs.foss=true`) leaves the full flavor out and never+declares or contacts Mapbox's Maven server.In the full flavor, Mapbox is optional: with `MAPBOX_ACCESS_TOKEN=pk...` (your own public token) in`local.properties` (git-ignored) the build offers the Mapbox map; without it the appdiff --git a/app/build.gradle.kts b/app/build.gradle.ktsindex 2d91c8a..0b5e8c0 100644--- a/app/build.gradle.kts+++ b/app/build.gradle.kts@@ -25,6 +25,9 @@ val mapboxToken: String = Properties().run {getProperty("MAPBOX_ACCESS_TOKEN", "").trim()}+// True for a FOSS-only build (see settings.gradle.kts): no full flavor, no Mapbox SDK, no Mapbox server.+val fossOnly = (gradle as ExtensionAware).extra["fossOnly"] as Boolean+// APKs come out as RFSentinel-v<versionName>-<buildType>.apkbase.archivesName.set("RFSentinel-v$appVersionName")@@ -58,7 +61,7 @@ android {// anyone who wants it; the map is OpenFreeMap. Same app ID, so either one replaces the other.flavorDimensions += "maps"productFlavors {- create("full") { dimension = "maps" }+ if (!fossOnly) create("full") { dimension = "maps" }create("foss") { dimension = "maps" }}@@ -132,7 +135,7 @@ dependencies {// without Vulkan, e.g. Android 9 phones with a PowerVR GE8320).implementation("org.maplibre.gl:android-sdk-vulkan-opengl:13.6.1")// Optional Mapbox map (Settings > Map > Map provider), full build only; needs MAPBOX_ACCESS_TOKEN in local.properties.- "fullImplementation"("com.mapbox.maps:android-ndk27:11.32.0")+ if (!fossOnly) "fullImplementation"("com.mapbox.maps:android-ndk27:11.32.0")// Android Auto (Car App Library, template-based UI; "projected" = phone-driven Android Auto)implementation("androidx.car.app:app:1.7.0")diff --git a/settings.gradle.kts b/settings.gradle.ktsindex 5168724..fa38b0c 100644--- a/settings.gradle.kts+++ b/settings.gradle.kts@@ -5,13 +5,20 @@ pluginManagement {gradlePluginPortal()}}+// A FOSS-only build (every task named is a foss one, e.g. assembleFossRelease, or -Prfs.foss=true) never+// declares or contacts Mapbox's server: the full flavor and its Mapbox SDK are left out (app/build.gradle.kts).+val fossOnly = providers.gradleProperty("rfs.foss").orNull == "true" ||+ gradle.startParameter.taskNames.filterNot { it.substringAfterLast(':') == "clean" }+ .let { t -> t.isNotEmpty() && t.all { it.contains("foss", ignoreCase = true) } }+(gradle as ExtensionAware).extra["fossOnly"] = fossOnly+dependencyResolutionManagement {repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)repositories {google()mavenCentral()- // Mapbox Maps SDK (the optional Mapbox map); only Mapbox's own artifacts come from here.- maven {+ // Mapbox Maps SDK (the optional Mapbox map, full flavor only); only Mapbox's own artifacts come from here.+ if (!fossOnly) maven {url = uri("https://api.mapbox.com/downloads/v2/releases/maven")content { includeGroupByRegex("com[.]mapbox.*") }}