fix(devices): use real Bluetooth MAC as device identity on Android 12+
Without BLUETOOTH_CONNECT, Android 12+ returns the fixed placeholder 02:00:00:00:00:00 for every Bluetooth device's address, so all BT devices collapsed onto the same equalizer identity and renames appeared to duplicate devices after re-pairing. Declare the permission, add a requestBluetoothConnect channel method mirroring the existing notification-permission flow, guard the placeholder in deviceToMap() with a colon-sanitized name-based fallback id (replacing the dead 00:00:00:00:00:00 branch), and re-emit the active device after the grant so already-connected devices pick up their real MAC without a reconnect. Work unit 1/2 of bt-device-identity (Kotlin plumbing).
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
|
||||
|
||||
<application
|
||||
android:label="PluriWave"
|
||||
|
||||
Reference in New Issue
Block a user