fix: remove BLE scan UUID filter to support non-standard scales (LePulse, etc)

Many consumer scales like LePulse FI2016LB don't advertise standard
Weight Scale (0x181D) or Body Composition (0x181B) service UUIDs.
Remove the scan filter so all BLE devices are discovered.
The GATT fallback already handles proprietary services.
This commit is contained in:
dadaloop82
2026-04-14 17:18:41 +00:00
parent 7ff7f56e0b
commit 0830b1b168
@@ -90,17 +90,12 @@ class BleScaleManager(
.setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)
.build()
// Filter for known weight/body-composition services; also allow unfiltered scan
val filters: List<ScanFilter> = listOf(
ScanFilter.Builder().setServiceUuid(android.os.ParcelUuid(BleUuids.WEIGHT_SCALE_SERVICE)).build(),
ScanFilter.Builder().setServiceUuid(android.os.ParcelUuid(BleUuids.BODY_COMPOSITION_SERVICE)).build(),
)
// No service UUID filters — many consumer scales use proprietary UUIDs
// and would be invisible with strict filtering. We show all named BLE devices.
isScanning = true
try {
leScanner?.startScan(filters, settings, scanCallback)
leScanner?.startScan(null, settings, scanCallback)
} catch (e: Exception) {
// Some devices reject filtered scan; fall back to unfiltered
leScanner?.startScan(scanCallback)
}