public final class LocalBluetoothAdapter extends Object
BluetoothAdapter
, specifically
those related to state transitions of the adapter itself.
Connection and bonding state changes affecting specific devices
are handled by CachedBluetoothDeviceManager
,
BluetoothEventManager
, and LocalBluetoothProfileManager
.
Modifier and Type | Method and Description |
---|---|
void |
cancelDiscovery() |
boolean |
disable() |
boolean |
enable() |
BluetoothLeScanner |
getBluetoothLeScanner() |
int |
getBluetoothState() |
Set<BluetoothDevice> |
getBondedDevices() |
int |
getConnectionState() |
String |
getName() |
BluetoothDevice |
getRemoteDevice(String address) |
int |
getScanMode() |
int |
getState() |
ParcelUuid[] |
getUuids() |
boolean |
isDiscovering() |
boolean |
isEnabled() |
boolean |
setBluetoothEnabled(boolean enabled) |
void |
setDiscoverableTimeout(int timeout) |
void |
setName(String name) |
void |
setScanMode(int mode) |
boolean |
setScanMode(int mode,
int duration) |
void |
startScanning(boolean force) |
void |
stopScanning() |
public void cancelDiscovery()
public boolean enable()
public boolean disable()
public Set<BluetoothDevice> getBondedDevices()
public String getName()
public int getScanMode()
public BluetoothLeScanner getBluetoothLeScanner()
public int getState()
public ParcelUuid[] getUuids()
public boolean isDiscovering()
public boolean isEnabled()
public int getConnectionState()
public void setDiscoverableTimeout(int timeout)
public void setName(String name)
public void setScanMode(int mode)
public boolean setScanMode(int mode, int duration)
public void startScanning(boolean force)
public void stopScanning()
public int getBluetoothState()
public boolean setBluetoothEnabled(boolean enabled)
public BluetoothDevice getRemoteDevice(String address)