BluetoothGatt.SetPreferredPhy Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Set the preferred connection PHY for this app.
[Android.Runtime.Register("setPreferredPhy", "(III)V", "", ApiSince=26)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public void SetPreferredPhy (Android.Bluetooth.BluetoothPhy txPhy, Android.Bluetooth.BluetoothPhy rxPhy, Android.Bluetooth.BluetoothPhyOption phyOptions);
[<Android.Runtime.Register("setPreferredPhy", "(III)V", "", ApiSince=26)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.SetPreferredPhy : Android.Bluetooth.BluetoothPhy * Android.Bluetooth.BluetoothPhy * Android.Bluetooth.BluetoothPhyOption -> unit
Parameters
- txPhy
- BluetoothPhy
preferred transmitter PHY. Bitwise OR of any of BluetoothDevice#PHY_LE_1M_MASK
, BluetoothDevice#PHY_LE_2M_MASK
, and BluetoothDevice#PHY_LE_CODED_MASK
.
- rxPhy
- BluetoothPhy
preferred receiver PHY. Bitwise OR of any of BluetoothDevice#PHY_LE_1M_MASK
, BluetoothDevice#PHY_LE_2M_MASK
, and BluetoothDevice#PHY_LE_CODED_MASK
.
- phyOptions
- BluetoothPhyOption
preferred coding to use when transmitting on the LE Coded PHY. Can be one
of BluetoothDevice#PHY_OPTION_NO_PREFERRED
, BluetoothDevice#PHY_OPTION_S2
or BluetoothDevice#PHY_OPTION_S8
- Attributes
Remarks
Set the preferred connection PHY for this app. Please note that this is just a recommendation, whether the PHY change will happen depends on other applications preferences, local and remote controller capabilities. Controller can override these settings.
BluetoothGattCallback#onPhyUpdate
will be triggered as a result of this call, even if no PHY change happens. It is also triggered when remote device updates the PHY.
Java documentation for android.bluetooth.BluetoothGatt.setPreferredPhy(int, int, int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.