語言

ScanCallback.OnScanResult(ScanCallbackType, ScanResult) 方法

定義

當發現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 掃描結果。

屬性

備註

當發現BLE廣告時再回撥。

Java 文件 android.bluetooth.le.ScanCallback.onScanResult(int, android.bluetooth.le.ScanResult)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於