-
Notifications
You must be signed in to change notification settings - Fork 87
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
How to use requestConnectionPriority? #367
Comments
Oh. 🤦 I think the As a workaround, can you (on Android only) cast to val peripheral = scope.peripheral(..) as AndroidPeripheral |
Thanks for your answer, your point looks consistent... Unfortunate! (_peripheral as AndroidPeripheral).requestConnectionPriority(Priority.High) Thanks again! |
It appears that changing the return type to At least not for the A Unless a similar "connection priority" functionality can be configured on the other platforms (then a common function could be provided on Apologies, I'm not aware of a better solution. |
Well, the casting does the job at least, no worries. The "right" way in my mind would be to add it to the PeripheralBuilder constructor in an Something like: val peripheral = scope.peripheral(advertisement) {
onConnection {
requestConnectionPriority(Priority.High)
}
} That said, that's working as-is and I feel like a short note in the docs would be sufficient to avoid the refactor. |
I'm trying to use
requestConnectionPriority
but cannot find a way to call the method on the client.I read #36 and the attached pull request !125 and tried
peripheral.requestConnectionPriority(Priority.High)
with no success onv0.18.0
.I might be wrong but I'm guessing the method is missing in the Peripheral interface though it is implemented in the AndroidPeripheral Class.
Is there something I'm missing? Thanks in advance!
The text was updated successfully, but these errors were encountered: