How do I enable the Android Connection Priority when connecting to a BLE device? #1446
Answered
by
aritchie
powerteqtpitman
asked this question in
Q&A
Replies: 1 comment 1 reply
-
IPeripheral peripheral; // discovered peripheral
#if ANDROID
peripheral.Connect(new AndroidConnectionConfig(
ConnectionPriority = Android.Bluetooth.GattConnectionPriority.High
));
#endif |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
powerteqtpitman
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I know the 3.x documentation is still marked as beta, so if this isn't implemented yet, please let me know and I will wait.
I am looking at the shiny documentation for the peripheral and it says to use this code to change the connection priority for Android:
// connect
peripheral.Connect(new GattConnectionConfig
{
///
/// This will cause disconnected peripherals to try to immediately reconnect. It will cause WillRestoreState to fire on iOS. Defaults to true
///
public bool IsPersistent { get; set; } = true;
});
I can't seem to find the GattConnectionConfig and the cross platform ConnectionConfig doesn't have the Priority property.
Please advise...
Beta Was this translation helpful? Give feedback.
All reactions