Reedyuk / blue-falcon

A Bluetooth kotlin multiplatform "Cross-Platform" library for iOS and Android
https://bluefalcon.dev
Apache License 2.0
321 stars 43 forks source link

:sparkles: Add callback for didWrite #89

Closed nilskasseckert closed 2 years ago

nilskasseckert commented 2 years ago

Related to this issue https://github.com/Reedyuk/blue-falcon/issues/83, this PR introduces a new method which is called on a successful write.

This method is only called when a write with response is sent. The didCharacteristcValueChanged method cannot be used because it is only called when data is changed.

writeValue is called when a packet is successfully accepted. As an acknowledgment has been made. didCharacteristcValueChanged is called only when a value has changed.