I'm trying to get the name of the device that is connected to the Android phone running android Oreo.
I was searching for an answer for the past two days, and none of them worked. suggestions mostly returning ioexception-read-failed-socket-might-closed-bluetooth
error
The question is, is there any way to make Query that returns the connected Bluetooth device?
These are the links and suggestion which not working:
- IOException: read failed, socket might closed - Bluetooth on Android 4.3
- In Android, how to get the profile of a connected bluetooth device?
- list connected bluetooth devices?
I can get information about the device that is previously paired and trying to make a connection or a device trying to pair to the device. what I want is the name or the connection state of the currently paired and connected device.
BluetoothSocket bluetoothSocket = bluetoothServerSocket.accept();
– Beforetime