don / cordova-plugin-ble-central

Bluetooth Low Energy (BLE) Central plugin for Apache Cordova (aka PhoneGap)
Apache License 2.0
941 stars 601 forks source link

writeDescriptor was deprecated in API level 33 #1006

Open fudom opened 2 months ago

fudom commented 2 months ago

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:

https://github.com/don/cordova-plugin-ble-central/blob/1727fd1d305f3265a72debe51af81d515ec40a19/src/android/Peripheral.java#L595-L599

https://github.com/don/cordova-plugin-ble-central/blob/1727fd1d305f3265a72debe51af81d515ec40a19/src/android/Peripheral.java#L632-L635