Java android.bluetooth BluetoothAdapter fields, constructors, methods, implement or subclass

Example usage for Java android.bluetooth BluetoothAdapter fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.bluetooth BluetoothAdapter.

The text is from its open source code.

Field

intERROR
Sentinel error value for this class.
StringACTION_STATE_CHANGED
Broadcast Action: The state of the local Bluetooth adapter has been changed.
StringEXTRA_STATE
Used as an int extra field in #ACTION_STATE_CHANGED intents to request the current power state.
StringEXTRA_PREVIOUS_STATE
Used as an int extra field in #ACTION_STATE_CHANGED intents to request the previous power state.
intSTATE_OFF
Indicates the local Bluetooth adapter is off.
intSTATE_TURNING_ON
Indicates the local Bluetooth adapter is turning on.
intSTATE_ON
Indicates the local Bluetooth adapter is on, and ready for use.
intSTATE_TURNING_OFF
Indicates the local Bluetooth adapter is turning off.
StringACTION_REQUEST_DISCOVERABLE
Activity Action: Show a system activity that requests discoverable mode.
StringEXTRA_DISCOVERABLE_DURATION
Used as an optional int extra field in #ACTION_REQUEST_DISCOVERABLE intents to request a specific duration for discoverability in seconds.
StringACTION_REQUEST_ENABLE
Activity Action: Show a system activity that allows the user to turn on Bluetooth.
StringACTION_SCAN_MODE_CHANGED
Broadcast Action: Indicates the Bluetooth scan mode of the local Adapter has changed.
StringEXTRA_SCAN_MODE
Used as an int extra field in #ACTION_SCAN_MODE_CHANGED intents to request the current scan mode.
intSCAN_MODE_NONE
Indicates that both inquiry scan and page scan are disabled on the local Bluetooth adapter.
intSCAN_MODE_CONNECTABLE
Indicates that inquiry scan is disabled, but page scan is enabled on the local Bluetooth adapter.
intSCAN_MODE_CONNECTABLE_DISCOVERABLE
Indicates that both inquiry scan and page scan are enabled on the local Bluetooth adapter.
StringACTION_DISCOVERY_STARTED
Broadcast Action: The local Bluetooth adapter has started the remote device discovery process.
StringACTION_DISCOVERY_FINISHED
Broadcast Action: The local Bluetooth adapter has finished the device discovery process.
StringACTION_CONNECTION_STATE_CHANGED
Intent used to broadcast the change in connection state of the local Bluetooth adapter to a profile of the remote device.
StringEXTRA_CONNECTION_STATE
Extra used by #ACTION_CONNECTION_STATE_CHANGED This extra represents the current connection state.
intSTATE_DISCONNECTED
The profile is in disconnected state
intSTATE_CONNECTING
The profile is in connecting state
intSTATE_CONNECTED
The profile is in connected state
intSTATE_DISCONNECTING
The profile is in disconnecting state

Method

booleancancelDiscovery()
Cancel the current device discovery process.
booleancheckBluetoothAddress(String address)
Validate a String Bluetooth address, such as "00:43:A8:23:10:F0"

Alphabetic characters must be uppercase to be valid.

booleandisable()
Turn off the local Bluetooth adapter—do not use without explicit user action to turn off Bluetooth.
booleanenable()
Turn on the local Bluetooth adapter—do not use without explicit user action to turn on Bluetooth.
StringgetAddress()
Returns the hardware address of the local Bluetooth adapter.
BluetoothLeAdvertisergetBluetoothLeAdvertiser()
Returns a BluetoothLeAdvertiser object for Bluetooth LE Advertising operations.
BluetoothLeScannergetBluetoothLeScanner()
Returns a BluetoothLeScanner object for Bluetooth LE scan operations.
SetgetBondedDevices()
Return the set of BluetoothDevice objects that are bonded (paired) to the local adapter.
ClassgetClass()
Returns the runtime class of this Object .
BluetoothAdaptergetDefaultAdapter()
Get a handle to the default local Bluetooth adapter.
StringgetName()
Get the friendly Bluetooth name of the local Bluetooth adapter.
BluetoothDevicegetRemoteDevice(String address)
Get a BluetoothDevice object for the given Bluetooth hardware address.
BluetoothDevicegetRemoteDevice(byte[] address)
Get a BluetoothDevice object for the given Bluetooth hardware address.
intgetScanMode()
Get the current Bluetooth scan mode of the local Bluetooth adapter.
intgetState()
Get the current state of the local Bluetooth adapter.
booleanisDiscovering()
Return true if the local Bluetooth adapter is currently in the device discovery process.
booleanisEnabled()
Return true if Bluetooth is currently enabled and ready for use.
booleanisMultipleAdvertisementSupported()
Return true if the multi advertisement is supported by the chipset
booleansetName(String name)
Set the friendly Bluetooth name of the local Bluetooth adapter.
booleanstartDiscovery()
Start the remote device discovery process.
booleanstartLeScan(LeScanCallback callback)
Starts a scan for Bluetooth LE devices.
booleanstartLeScan(final UUID[] serviceUuids, final LeScanCallback callback)
Starts a scan for Bluetooth LE devices, looking for devices that advertise given services.
voidstopLeScan(LeScanCallback callback)
Stops an ongoing Bluetooth LE device scan.