Android APIs
public final class

BluetoothLeScanner

extends Object
java.lang.Object
   ↳ android.bluetooth.le.BluetoothLeScanner

Class Overview

This class provides methods to perform scan related operations for Bluetooth LE devices. An application can scan for a particular type of BLE devices using ScanFilter. It can also request different types of callbacks for delivering the result.

Use getBluetoothLeScanner() to get an instance of BluetoothLeScanner.

Note most of the scan methods here require BLUETOOTH_ADMIN permission.

See Also

Summary

Public Methods
void startScan(List<ScanFilter> filters, ScanSettings settings, ScanCallback callback)
Start Bluetooth LE scan.
void stopScan(ScanCallback callback)
Stops an ongoing Bluetooth LE scan.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public void startScan (List<ScanFilter> filters, ScanSettings settings, ScanCallback callback)

Start Bluetooth LE scan. The scan results will be delivered through callback.

Requires BLUETOOTH_ADMIN permission.

Parameters
filters ScanFilters for finding exact BLE devices.
settings Settings for ble scan.
callback Callback when scan results are delivered.
Throws
IllegalArgumentException If settings or callback is null.

public void stopScan (ScanCallback callback)

Stops an ongoing Bluetooth LE scan.

Requires BLUETOOTH_ADMIN permission.