void PlatformSetPreferredPhy(BluetoothPhy phy) { if (Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.O) { _gatt.SetPreferredPhy(ToAndroidPhy(phy), ToAndroidPhy(phy), ABluetooth.BluetoothPhyOption.NoPreferred); } }
private static ABluetooth.BluetoothPhy ToAndroidPhy(BluetoothPhy phy) { switch (phy) { case BluetoothPhy.Le1m: return(ABluetooth.BluetoothPhy.Le1m); case BluetoothPhy.Le2m: return(ABluetooth.BluetoothPhy.Le2m); case BluetoothPhy.LeCoded: return(ABluetooth.BluetoothPhy.LeCoded); default: throw new PlatformNotSupportedException($"Unrecognised PHY {phy}"); } }
void PlatformSetPreferredPhy(BluetoothPhy phy) { }