Skip to content

Troubleshooting

HmnDev-Tech edited this page Sep 30, 2026 · 1 revision

Troubleshooting

START does nothing / "advertiser failed"

  • Bluetooth must be ON.
  • The device must support BLE advertising. Not every phone does; some vendors disable it entirely. Check with any BLE beacon/advertiser app first.
  • Vendor battery savers (MIUI, One UI power modes, EMUI) often kill background advertising — whitelist the app.
  • Turn the foreground service on in Settings so the loop is not killed mid-run.
  • The app reports the failure explicitly instead of pretending to run — if you see an error, advertising genuinely failed on that device.

Scan finds nothing (Spam Radar)

  1. Confirm Location permission on Android 11 and lower — Android requires it for any BLE scan, no exceptions.
  2. Confirm Location services (GPS) are enabled on Android 11 and lower; scanning is blocked while they are off regardless of the permission.
  3. Android 12+: the Nearby Devices permission must be granted.
  4. The phone must be within range of the advertiser — BLE range in practice is a few meters; RSSI below roughly −90 dBm is noise.
  5. Scanning and advertising on the same chip simultaneously is supported but some firmware throttles it; lower the advertising interval and rescan.

Permission prompts do not appear

  • Revoke and re-grant: Settings → Apps → BLE-Droid → Permissions.
  • If you denied twice, Android silences the prompt — re-enable from the app info screen manually.

Notification does not show (foreground service)

  • Android 13+: grant the Notifications permission.
  • Some OEMs hide notifications from background services by default — enable them in system settings.

Debug and release will not install over each other

They are intentionally different applications: the debug build adds the .debug suffix to its application ID (com.bledroid.debug). Install both side by side, or uninstall one first.

"App not installed" when updating

  • The APK must be signed with the same certificate as the installed one. CI runs without the KEYSTORE_B64 secret sign with a throwaway key, so such APKs cannot update an earlier install — see Building and Signing.
  • versionCode must not be lower than the installed one.

Build failures

  • SDK location not found → install the Android SDK and set ANDROID_HOME.
  • Wrong Java version → JDK 21 is required.
  • Compose/Kotlin mismatch → do not override versions from gradle/libs.versions.toml; the build uses the version catalog.

Still stuck? Open a Q&A discussion with your device, Android version, app version and logcat:

adb logcat -s BluetoothLeScanner BleAdvertiserEngine SpamForegroundService