Stay organized with collections
Save and categorize content based on your preferences.
BluetoothAdapter.LeScanCallback
public
static
interface
BluetoothAdapter.LeScanCallback
android.bluetooth.BluetoothAdapter.LeScanCallback
|
Callback interface used to deliver LE scan results.
Summary
Public methods
onLeScan
public abstract void onLeScan (BluetoothDevice device,
int rssi,
byte[] scanRecord)
Callback reporting an LE device found during a device scan initiated by the BluetoothAdapter.startLeScan(LeScanCallback)
function.
Parameters |
device |
BluetoothDevice : Identifies the remote device |
rssi |
int : The RSSI value for the remote device as reported by the Bluetooth hardware. 0
if no RSSI value is available. |
scanRecord |
byte : The content of the advertisement record offered by the remote device. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# BluetoothAdapter.LeScanCallback\n\nAdded in [API level 18](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nBluetoothAdapter.LeScanCallback\n===============================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/bluetooth/BluetoothAdapter.LeScanCallback \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nBluetoothAdapter.LeScanCallback\n`\n\n\n`\n\n\n`\n\n|---------------------------------------------------|\n| android.bluetooth.BluetoothAdapter.LeScanCallback |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nCallback interface used to deliver LE scan results. \n**See also:**\n\n- [BluetoothAdapter.startLeScan(LeScanCallback)](/reference/android/bluetooth/BluetoothAdapter#startLeScan(android.bluetooth.BluetoothAdapter.LeScanCallback))\n- [BluetoothAdapter.startLeScan(UUID[], LeScanCallback)](/reference/android/bluetooth/BluetoothAdapter#startLeScan(java.util.UUID[],%20android.bluetooth.BluetoothAdapter.LeScanCallback))\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onLeScan](/reference/android/bluetooth/BluetoothAdapter.LeScanCallback#onLeScan(android.bluetooth.BluetoothDevice,%20int,%20byte[]))`(`[BluetoothDevice](/reference/android/bluetooth/BluetoothDevice)` device, int rssi, byte[] scanRecord) ` Callback reporting an LE device found during a device scan initiated by the [BluetoothAdapter.startLeScan(LeScanCallback)](/reference/android/bluetooth/BluetoothAdapter#startLeScan(android.bluetooth.BluetoothAdapter.LeScanCallback)) function. |\n\nPublic methods\n--------------\n\n### onLeScan\n\nAdded in [API level 18](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onLeScan (BluetoothDevice device, \n int rssi, \n byte[] scanRecord)\n```\n\nCallback reporting an LE device found during a device scan initiated by the [BluetoothAdapter.startLeScan(LeScanCallback)](/reference/android/bluetooth/BluetoothAdapter#startLeScan(android.bluetooth.BluetoothAdapter.LeScanCallback)) function.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------|----------------------------------------------------------------------------------------------------------------------------|\n| `device` | `BluetoothDevice`: Identifies the remote device \u003cbr /\u003e |\n| `rssi` | `int`: The RSSI value for the remote device as reported by the Bluetooth hardware. 0 if no RSSI value is available. \u003cbr /\u003e |\n| `scanRecord` | `byte`: The content of the advertisement record offered by the remote device. \u003cbr /\u003e |"]]