BLE GATT 服务器名称

BLE GATT server name

我已经创建了一个 BLE GATT 服务器的 android 应用程序,但是我找不到在哪里写 GATT 服务器的名称,我的意思是搜索中出现的设备名称。

我都试过了 https://github.com/androidthings/sample-bluetooth-le-gattserver https://github.com/googlesamples/android-BluetoothLeGatt

而且找不到正在写入的设备名称在哪里? BLE 搜索如何决定显示什么名称?

我刚试过:

BluetoothAdapter.getDefaultAdapter().setName("MyGattServerNa‌​me");

成功了!!!