简体   繁体   中英

How to get the Bluetooth device model name?

I have an android application related to bluetooth and I have a question. How can I find out which device is connected to a smartphone? I need to know the device model, I can get the device name, but the user can change it, for example “MEIZU EP51” == >> “My favorite headphones”. I need to get the device model or ID, for example, I connected the Meizu EP51 headphones and I need the phone to recognize exactly the model of these headphones. In the Android documentation, I did not find it, maybe I did not read carefully, I would be grateful for the answer.

You can get the connected ble devices by Bluetooth Manager like this,

BluetoothManager bluetoothManager = (BluetoothManager) this.getSystemService(Context.BLUETOOTH_SERVICE);
List<BluetoothDevice> devices = bluetoothManager.getConnectedDevices(BluetoothProfile.GATT);

As i have Mi Band 3 i can see this connected device over it. But as it is BLE device so it is visible to me but not sure about other devices.

By BluetoothDevice object you can get device name and address. Try it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM