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.

Errors: plain sentence and a next step instead of raw exception text

CIS-C0a6e3ceac1cc8
diff --git a/app/src/main/java/com/rfsentinel/app/MainActivity.kt b/app/src/main/java/com/rfsentinel/app/MainActivity.kt
index 4cbe97a..5a57bd8 100644
--- a/app/src/main/java/com/rfsentinel/app/MainActivity.kt
+++ b/app/src/main/java/com/rfsentinel/app/MainActivity.kt
@@ -1451,7 +1451,8 @@ class MainActivity : AppCompatActivity() {
try {
ScanForegroundService.start(this)
} catch (e: Exception) {
- binding.statusText.text = "Could not start scanner: ${e.message}"
+ android.util.Log.w("RFSentinel", "Scan didn't start", e)
+ binding.statusText.text = "Couldn't start scanning. Check that Bluetooth and Location are on, then tap Start again."
return
}
binding.root.postDelayed({ updateStatus() }, 500)
diff --git a/app/src/main/java/com/rfsentinel/app/ui/DeviceHistoryActivity.kt b/app/src/main/java/com/rfsentinel/app/ui/DeviceHistoryActivity.kt
index a332689..0ec2fb7 100644
--- a/app/src/main/java/com/rfsentinel/app/ui/DeviceHistoryActivity.kt
+++ b/app/src/main/java/com/rfsentinel/app/ui/DeviceHistoryActivity.kt
@@ -144,7 +144,7 @@ class DeviceHistoryActivity : AppCompatActivity() {
dialog.dismiss()
val r = result.getOrNull()
if (r == null) {
- val why = (result.exceptionOrNull() as? com.rfsentinel.app.util.DeviceHistoryImport.NotHistory)?.message ?: "Couldn't read that file (${result.exceptionOrNull()?.message ?: "unknown error"})"
+ val why = (result.exceptionOrNull() as? com.rfsentinel.app.util.DeviceHistoryImport.NotHistory)?.message ?: "Couldn't read that file. Choose a device history file exported from RF Sentinel, then try again."
MaterialAlertDialogBuilder(this@DeviceHistoryActivity).setTitle("Not imported").setMessage(why).setPositiveButton("OK", null).show()
return@launch
}
diff --git a/app/src/main/java/com/rfsentinel/app/ui/WazeStatusActivity.kt b/app/src/main/java/com/rfsentinel/app/ui/WazeStatusActivity.kt
index 673f187..444452e 100644
--- a/app/src/main/java/com/rfsentinel/app/ui/WazeStatusActivity.kt
+++ b/app/src/main/java/com/rfsentinel/app/ui/WazeStatusActivity.kt
@@ -185,7 +185,7 @@ class WazeStatusActivity : AppCompatActivity() {
"${String.format(Locale.US, "%.3f", Diagnostics.sentLat)}, ${String.format(Locale.US, "%.3f", Diagnostics.sentLon)} (never your exact position)",
"Account: " + (if (WazeRtFetcher.hasStoredAccount(this)) "an anonymous account is stored on this phone" else "none yet; one is made on the next check") +
" (${WazeRtFetcher.accountsMadeToday(this)} of ${WazeRtFetcher.dailyAccountLimit()} made today)",
- Diagnostics.lastError.takeIf { it.isNotEmpty() }?.let { "Last problem: $it" }
+ Diagnostics.lastError.takeIf { it.isNotEmpty() }?.let { "Last problem: $it\nIt tries again at the next check." }
).joinToString("\n") else listOf(
"Your API key and a box of about ${Prefs.formatRange(Prefs.wazeReachM(this))} around your position (not rounded)",
"API key: " + (if (SecureStore.get(this, OnlineWatch.WAZE_KEY_NAME).isNullOrBlank()) "not set" else "set")
@@ -232,7 +232,7 @@ class WazeStatusActivity : AppCompatActivity() {
"${String.format(Locale.US, "%.3f", Diagnostics.sentLat)}, ${String.format(Locale.US, "%.3f", Diagnostics.sentLon)} (never your exact position)"
lines += "Account: " + (if (WazeRtFetcher.hasStoredAccount(this)) "an anonymous account is stored on this phone" else "none yet; one is made on the next check") +
" (${WazeRtFetcher.accountsMadeToday(this)} of ${WazeRtFetcher.dailyAccountLimit()} made today)"
- if (Diagnostics.lastError.isNotEmpty()) lines += "Last problem: ${Diagnostics.lastError}"
+ if (Diagnostics.lastError.isNotEmpty()) lines += "Last problem: ${Diagnostics.lastError}\nIt tries again at the next check."
} else {
lines += "Source: OpenWeb Ninja (api.openwebninja.com)"
lines += "Sent: your API key and a box of about ${Prefs.formatRange(Prefs.wazeReachM(this))} around your position (not rounded)"