yanshouwang / bluetooth_low_energy

A Flutter plugin for controlling the bluetooth low energy.
https://pub.dev/packages/bluetooth_low_energy
MIT License
47 stars 15 forks source link

Android connection priority #95

Open mpecar opened 3 weeks ago

mpecar commented 3 weeks ago

I am using your plugin for some time now and it is working very well!

I see that you are working on version 7, but one thing that I really need on Android is still missing. Can you please expose this: https://developer.android.com/reference/android/bluetooth/BluetoothGatt#requestConnectionPriority(int)

The story behind this is similar to "why do we ever need to set the MTU?". I am not sure what happens, but my guess would be: I have peripheral devices that use high priority, but they somehow fail to notify the central. The result is that central misses data packets. I can fix this by setting the priority to CONNECTION_PRIORITY_HIGH, but not with your package.

Any chance of including this in v7?

yanshouwang commented 3 weeks ago

No problem, I'll add this method in the next version.

mpecar commented 3 weeks ago

Great!