Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

writeDescriptor was deprecated in API level 33 #1006

Open
fudom opened this issue Mar 8, 2024 · 0 comments
Open

writeDescriptor was deprecated in API level 33 #1006

fudom opened this issue Mar 8, 2024 · 0 comments
Labels
Milestone

Comments

@fudom
Copy link
Contributor

fudom commented Mar 8, 2024

The method writeDescriptor is deprecated. (click on the link) The new method returns int instead of boolean. Maybe we need to wrap this into a API check. I don't know what the byte[] value is. Both method descriptions refer to value, but the deprecated one has no value. Does anyone have experience with it?

Example usage:

if (!gatt.writeDescriptor(descriptor)) {
callbackContext.error("Failed to set client characteristic notification for " + characteristicUUID);
notificationCallbacks.remove(key);
commandCompleted();
}

if (descriptor != null) {
descriptor.setValue(BluetoothGattDescriptor.DISABLE_NOTIFICATION_VALUE);
gatt.writeDescriptor(descriptor);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants