I am trying to find a specific type of device based on its services from the list of already paired devices, but when I get the devices UUID, none of the services supported by the device actually show up.
I don't want to device.connectGatt(this, false, gattCallback); to every single device paired to eventually find the right one, due to it being inefficient.
The relevant segment of code is as follows
for(BluetoothDevice device : bondedDevices) {
ParcelUuid temp_uuids = device.getUuids();
for (ParcelUuid uuids : myUuids) {
if (uuids.equals(temp_uuids)) {
targetDevice = device;
return targetDevice;
}
}
}
Log.d(TAG, "Target Device Not Found");
return targetDevice;
the if (uuids.equals(temp_uuids))statement where it checks equals is never met, I believe my bluetooth device is supposed to add the GATT service UUID under its list of services included in SDP, but for some reason it is not being detected.