android BluetoothDevice.getName() return null

Finally, i found out the solution: 1.For device connected: Read device name from gatt characteristic org.bluetooth.characteristic.gap.device_name of service org.bluetooth.service.generic_access. 2.For device no connected: /** * Get device name from ble advertised data */ private LeScanCallback mScanCb = new LeScanCallback() { @Override public void onLeScan(final BluetoothDevice device, final int rssi, byte[] scanRecord) { final BleAdvertisedData badata … Read more