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

Added Connection Parameters Update Callback #565

Merged
merged 11 commits into from
May 17, 2019

Conversation

dariuszseweryn
Copy link
Owner

@dariuszseweryn dariuszseweryn commented Apr 26, 2019

The access to the callback is available through RxBleConnection.observeConnectionParametersUpdates()

Additionally it is possible to get it in RxBleCustomOperation:

  • RxBleGattCallback.getConnectionParametersUpdates()
  • RxBleGattCallback.setHiddenGattCallback(HiddenBluetoothGattCallback)

The callback is not used for completing RxBleConnection.requestConnectionPriority(). It is not possible to universally distinguish which callback is the one that should complete the request. Why? Android OS does change connection parameters on its own at the beginning of the connection to speedup service discovery process. After the discovery parameters are relaxed. If a request is made during this period it is not possible to know which callback is related to the user's request. It is worth noting that making a request early will make it quickly overwritten by the above mentioned process.
Additionally this is not a part of public API and is not guaranteed to be called.

Closes #508

@dariuszseweryn dariuszseweryn added this to the 1.10.0 milestone Apr 26, 2019
@dariuszseweryn dariuszseweryn self-assigned this May 13, 2019
@dariuszseweryn dariuszseweryn merged commit 42a4251 into develop May 17, 2019
@dariuszseweryn dariuszseweryn deleted the feature/parameter_update_callback branch May 17, 2019 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant