ScanSettings.Builder.SetPhy(BluetoothPhy) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在這次掃描時設定物理層使用。
[Android.Runtime.Register("setPhy", "(I)Landroid/bluetooth/le/ScanSettings$Builder;", "", ApiSince=26)]
public Android.Bluetooth.LE.ScanSettings.Builder? SetPhy(Android.Bluetooth.BluetoothPhy phy);
[<Android.Runtime.Register("setPhy", "(I)Landroid/bluetooth/le/ScanSettings$Builder;", "", ApiSince=26)>]
member this.SetPhy : Android.Bluetooth.BluetoothPhy -> Android.Bluetooth.LE.ScanSettings.Builder
參數
- phy
- BluetoothPhy
可以是BluetoothDevice.PHY_LE_1M、BluetoothDevice.PHY_LE_CODED或ScanSettings.PHY_LE_ALL_SUPPORTED
傳回
- 屬性
備註
在這次掃描時設定物理層使用。 此方法僅在 ScanSettings.Builder.setLegacy 設為 false 時使用。 BluetoothAdapter.isLeCodedPhySupported() 可用來查詢是否支援 LE Coded phy,方法是呼叫 BluetoothAdapter.isLeCodedPhySupported()。 選擇無支援的 PHY 會導致無法啟動掃描。
Android 參考資料。android.bluetooth.le.ScanSettings.Builder.setPhy
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。