Android APIs
public final class

ScanSettings

extends Object
implements Parcelable
java.lang.Object
   ↳ android.bluetooth.le.ScanSettings

Class Overview

Settings for Bluetooth LE scan.

Summary

Nested Classes
class ScanSettings.Builder Builder for ScanSettings
Constants
int CALLBACK_TYPE_ON_UPDATE Callback each time when a bluetooth advertisement is found.
int SCAN_MODE_BALANCED Perform Bluetooth LE scan in balanced power mode.
int SCAN_MODE_LOW_LATENCY Scan using highest duty cycle.
int SCAN_MODE_LOW_POWER Perform Bluetooth LE scan in low power mode.
int SCAN_RESULT_TYPE_FULL Full scan result which contains device mac address, rssi, advertising and scan response and scan timestamp.
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<ScanSettings> CREATOR
Public Methods
int describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
int getCallbackType()
long getReportDelayNanos()
Returns report delay timestamp based on the device clock.
int getScanMode()
int getScanResultType()
void writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final int CALLBACK_TYPE_ON_UPDATE

Callback each time when a bluetooth advertisement is found.

Constant Value: 0 (0x00000000)

public static final int SCAN_MODE_BALANCED

Perform Bluetooth LE scan in balanced power mode.

Constant Value: 1 (0x00000001)

public static final int SCAN_MODE_LOW_LATENCY

Scan using highest duty cycle. It's recommended only using this mode when the application is running in foreground.

Constant Value: 2 (0x00000002)

public static final int SCAN_MODE_LOW_POWER

Perform Bluetooth LE scan in low power mode. This is the default scan mode as it consumes the least power.

Constant Value: 0 (0x00000000)

public static final int SCAN_RESULT_TYPE_FULL

Full scan result which contains device mac address, rssi, advertising and scan response and scan timestamp.

Constant Value: 0 (0x00000000)

Fields

public static final Creator<ScanSettings> CREATOR

Public Methods

public int describeContents ()

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Returns
  • a bitmask indicating the set of special object types marshalled by the Parcelable.

public int getCallbackType ()

public long getReportDelayNanos ()

Returns report delay timestamp based on the device clock.

public int getScanMode ()

public int getScanResultType ()

public void writeToParcel (Parcel dest, int flags)

Flatten this object in to a Parcel.

Parameters
dest The Parcel in which the object should be written.
flags Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.