BluetoothGattServer.SetPreferredPhy 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
為這個應用程式設定首選的連線 PHY。
[Android.Runtime.Register("setPreferredPhy", "(Landroid/bluetooth/BluetoothDevice;III)V", "", ApiSince=26)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public void SetPreferredPhy(Android.Bluetooth.BluetoothDevice? device, Android.Bluetooth.BluetoothPhy txPhy, Android.Bluetooth.BluetoothPhy rxPhy, Android.Bluetooth.BluetoothPhyOption phyOptions);
[<Android.Runtime.Register("setPreferredPhy", "(Landroid/bluetooth/BluetoothDevice;III)V", "", ApiSince=26)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.SetPreferredPhy : Android.Bluetooth.BluetoothDevice * Android.Bluetooth.BluetoothPhy * Android.Bluetooth.BluetoothPhy * Android.Bluetooth.BluetoothPhyOption -> unit
參數
- device
- BluetoothDevice
傳送此回應的遠端裝置。
- txPhy
- BluetoothPhy
偏好發射機 PHY。
- rxPhy
- BluetoothPhy
偏好的接球員PHY。
- phyOptions
- BluetoothPhyOption
在LE編碼PHY傳輸時偏好使用的編碼方式。 可以是其中 BluetoothDevice#PHY_OPTION_NO_PREFERRED之一, BluetoothDevice#PHY_OPTION_S2 或 BluetoothDevice#PHY_OPTION_S8。
- 屬性
備註
為這個應用程式設定首選的連線 PHY。 請注意,這只是建議,PHY 是否會改變取決於其他應用程式的偏好、本地和遠端控制器的功能。 控制器可以覆寫這些設定。
BluetoothGattServerCallback#onPhyUpdate 即使 PHY 沒有變動,也會因此呼叫而被觸發。 當遠端裝置更新 PHY 時,也會觸發。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。