0

When scanning with a android.bluetooth.le.BluetoothLeScanner, after disconnecting a device, that device's BluetoothDevice object sometimes has a null name.

Specifically, in the same call to my ScanCallback's public void onScanResult(int callbackType, ScanResult result) handler, result.getScanRecord().getDeviceName() returns the device name, but result.getDevice().getName() returns null.

Could you tell me why this happens? Maybe something I need to call during disconnect to put my device in a good state? Or could this be a problem with what the device is broadcasting? Or a known bug?

1
  • "In Bluetooth Low Energy, advertisement and scan-response data is only required to have the Bluetooth Address. Advertisement data is how a client BTLE endpoint discovers a service device. A client can request a scan response and get more data. The device name is optional in this data." - see [link] (stackoverflow.com/questions/26290640/…) @brian-reinhold 's response Commented Apr 30 at 10:10

0