Android Bluetoothdevice.Getname() Return Null

BluetoothDevice always returns null on getName()

It could be that your BLE device isn't broadcasting a name. The broadcast payload is limited to 31 bytes and some manufacturers omit a name to save room.

RxAndroidBle - RxBleDevice getName() always returns null

BluetoothDevice may have a null name if it is not broadcasted. You may alternatively check for a name from scanResult.getScanRecord().getDeviceName() though it also can be null.

This question was answered already
here or here.

Scan Ble Android / getName() or device not complete or null

If the peripheral's name does not fit in the Advertising data since it needs to include other data therein, it will only send the prefix of the name over the air. It's nothing you can do about that other than change the advertisement data in the peripheral's firmware.

To get the exact advertisement data, you can investigate the "result.getScanRecord()" ScanRecord in onScanResult.



Related Topics



Leave a reply



Submit