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

Use API level 33 BLE functions (read, write & events) #985

Open
peitschie opened this issue Aug 15, 2023 · 3 comments
Open

Use API level 33 BLE functions (read, write & events) #985

peitschie opened this issue Aug 15, 2023 · 3 comments
Assignees
Labels
Milestone

Comments

@peitschie
Copy link
Collaborator

Introduced in API level 33:
https://developer.android.com/reference/android/bluetooth/BluetoothGatt#writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic,%20byte[],%20int)

The previous writeCharacteristic method has been deprecated, and now carries this warning:

This method was deprecated in API level 33.
Use BluetoothGatt#writeCharacteristic(BluetoothGattCharacteristic, byte[], int) as this is not memory safe because it relies on a BluetoothGattCharacteristic object whose underlying fields are subject to change outside this method.

@peitschie
Copy link
Collaborator Author

A good example of this implementation is at capacitor-community/bluetooth-le#572

@peitschie peitschie changed the title Use API level 33 writeCharacteristic function Use API level 33 BLE functions (read, write & events) Nov 3, 2023
@peitschie
Copy link
Collaborator Author

Example code snippet in #997

@peitschie
Copy link
Collaborator Author

Also relates to #1006

@peitschie peitschie added this to the next milestone Jun 7, 2024
@peitschie peitschie self-assigned this Jul 14, 2024
@peitschie peitschie modified the milestones: 1.7.5, breaking Jul 14, 2024
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

1 participant