-
Notifications
You must be signed in to change notification settings - Fork 469
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
[Feature]: Android: Get connection parameters #746
Comments
not possible. android and ios don't expose this. please link me the docs if i'm wrong. |
Oh that's interesting. I just assumed they did. Have you used Nordic's nRF connect app for android? It seems to be able to log when connection parameters are changed, and show information like that. So it's maybe hooking on somehow. But I don't believe that particular app is open sourced. |
On Android, I think is some kind of callback whenever the connection is updated: I saw from my logs whilst debugging my app:
There seems to be this onConnectionUpdated method in BluetoothGatt.java. See this https://stackoverflow.com/a/52757948 |
interesting. never saw that before! it's not in the documentation: https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback feel free to open a PR |
Yeah sure. If I get some time I can try to contribute that feature |
I mean, only if you need this feature. otherwise we shouldn't add it if no one wants it. |
FlutterBluePlus Version
1.31.2
Flutter Version
3.16.5
What OS?
All
OS Version
macOS
Bluetooth Module
.
What is your feature request?
It would be nice to have an API to be able to get some other current connection parameters other than MTU for the connected device, for example, connection interval, without having to dig down into the platform APIs. Would this be a fairly straightforward addition?
Logs
.
The text was updated successfully, but these errors were encountered: