Exemplo n.º 1
0
 void PlatformSetPreferredPhy(BluetoothPhy phy)
 {
     if (Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.O)
     {
         _gatt.SetPreferredPhy(ToAndroidPhy(phy), ToAndroidPhy(phy), ABluetooth.BluetoothPhyOption.NoPreferred);
     }
 }
Exemplo n.º 2
0
        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}");
            }
        }
Exemplo n.º 3
0
 void PlatformSetPreferredPhy(BluetoothPhy phy)
 {
 }