Version: Smart Feature Phone 3.0

BluetoothAdapter.startLeScan

Description#

The method is used to have the device's adapter start seeking for remote LE devices advertising given services.

Syntax#

var promise = instanceOfBluetoothAdapter.startLeScan(serviceUuids);

Parameters#

  • serviceUuids

A DOMString array of service UUIDs to seek for. An empty array means to seek for devices advertising any service.

Return value#

A Promise to indicate whether the operation is resolved or rejected. If the Promise is resolved, it returns a BluetoothDiscoveryHandle. The BluetoothDiscoveryHandle's event handler ondevicefound is fired each time a remote bluetooth LE device is found. If the bluetooth adapter is currently disabled, the Promise would be rejected.