ScanCallback.OnScanResult(ScanCallbackType, ScanResult) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
找到 BLE 公告時回呼。
[Android.Runtime.Register("onScanResult", "(ILandroid/bluetooth/le/ScanResult;)V", "GetOnScanResult_ILandroid_bluetooth_le_ScanResult_Handler")]
public virtual void OnScanResult (Android.Bluetooth.LE.ScanCallbackType callbackType, Android.Bluetooth.LE.ScanResult? result);
[<Android.Runtime.Register("onScanResult", "(ILandroid/bluetooth/le/ScanResult;)V", "GetOnScanResult_ILandroid_bluetooth_le_ScanResult_Handler")>]
abstract member OnScanResult : Android.Bluetooth.LE.ScanCallbackType * Android.Bluetooth.LE.ScanResult -> unit
override this.OnScanResult : Android.Bluetooth.LE.ScanCallbackType * Android.Bluetooth.LE.ScanResult -> unit
參數
- callbackType
- ScanCallbackType
決定如何觸發此回呼。 可以是、 或 的ScanSettings#CALLBACK_TYPE_ALL_MATCHES
ScanSettings#CALLBACK_TYPE_FIRST_MATCH
其中一個ScanSettings#CALLBACK_TYPE_MATCH_LOST
- result
- ScanResult
藍牙 LE 掃描結果。
- 屬性
備註
的 android.bluetooth.le.ScanCallback.onScanResult(int, android.bluetooth.le.ScanResult)
Java 檔。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。