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
How to Instantiate Application Com.Android.Tools.Fd.Runtime.Bootstrapapplication Android
Googleplayservicesutil VS Googleapiavailability
How to Implement an Android:Background That Doesn't Stretch
Seekbar and Media Player in Android
Sync Scrolling of Multiple Recyclerviews
Touch and Drag Image in Android
How to Set Alarm in Android Programmatically
How to Save Images into Database
Android Listview Row Delete Animation
Get Battery Level Before Broadcast Receiver Responds for Intent.Action_Battery_Changed
Rotate View Hierarchy 90 Degrees
Webservice Credentials - Openid/Android Accountmanager
Android Emulator Issues in New Versions - the Emulator Process Has Terminated
How to Restart Adb Manually from Android Studio
How to Implement My Own Disk Cache with Picasso Library - Android