How can I get the new name of a bonded device that was changed in the Bluetooth settings? Is it possible to track this change?
I checked:
val adapter = context.getSystemService<BluetoothManager>()?.adapter
adapter.bondedDevices.forEach {it.name}
- name does not change (and after restarting the phone and reconnecting the device)adapter.getRemoteDevice("2C:4D:79:C2:46:E7").name
- name does not changereceiver + IntentFilter(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED)
- here all works, the PHONE name changes, but i need a similar mechanism for bluetooth bonded devicesadapter.bondedDevices.forEach {it.alias} ...