See the attached image and code below. I am checking to see if a Bluetooth device has an SPP UUID. It does, and says it does, but the statement evaluates as false anyways. The same is true if I break out the UUID name and evaluate it.
Parcelable[] uuids = device.getUuids();
if(uuids != null) {
for (Parcelable parcelable: uuids) {
ParcelUuid parcelUuid = (ParcelUuid) parcelable;
UUID uuid = parcelUuid.getUuid();
String str = SPP_UUID.toString();
String cmp = parcelUuid.getUuid().toString();
if (uuid.equals(Constants.SPP_UUID)) {
isSPP = true;
}
}
}
UUIDS IMAGE Please help, this is very frustrating as it seems so basic. Thank you, Tom
Aucun commentaire:
Enregistrer un commentaire