@Implements(value=android.bluetooth.BluetoothAdapter.class) public class ShadowBluetoothAdapter extends Object
BluetoothAdapter.| Constructor and Description |
|---|
ShadowBluetoothAdapter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancelDiscovery() |
static boolean |
checkBluetoothAddress(String address)
Validate a Bluetooth address, such as "00:43:A8:23:10:F0"
|
boolean |
disable() |
boolean |
enable() |
String |
getAddress() |
Set<android.bluetooth.BluetoothDevice> |
getBondedDevices() |
static android.bluetooth.BluetoothAdapter |
getDefaultAdapter() |
Set<android.bluetooth.BluetoothAdapter.LeScanCallback> |
getLeScanCallbacks() |
android.bluetooth.BluetoothAdapter.LeScanCallback |
getSingleLeScanCallback() |
int |
getState() |
boolean |
isDiscovering() |
boolean |
isEnabled() |
void |
setAddress(String address) |
void |
setBondedDevices(Set<android.bluetooth.BluetoothDevice> bluetoothDevices) |
void |
setEnabled(boolean enabled) |
void |
setState(int state) |
boolean |
startDiscovery() |
boolean |
startLeScan(android.bluetooth.BluetoothAdapter.LeScanCallback callback) |
boolean |
startLeScan(UUID[] serviceUuids,
android.bluetooth.BluetoothAdapter.LeScanCallback callback) |
void |
stopLeScan(android.bluetooth.BluetoothAdapter.LeScanCallback callback) |
@Implementation public static android.bluetooth.BluetoothAdapter getDefaultAdapter()
@Implementation public Set<android.bluetooth.BluetoothDevice> getBondedDevices()
public void setBondedDevices(Set<android.bluetooth.BluetoothDevice> bluetoothDevices)
@Implementation public boolean startDiscovery()
@Implementation public boolean cancelDiscovery()
@Implementation public boolean startLeScan(android.bluetooth.BluetoothAdapter.LeScanCallback callback)
@Implementation public boolean startLeScan(UUID[] serviceUuids, android.bluetooth.BluetoothAdapter.LeScanCallback callback)
@Implementation public void stopLeScan(android.bluetooth.BluetoothAdapter.LeScanCallback callback)
public Set<android.bluetooth.BluetoothAdapter.LeScanCallback> getLeScanCallbacks()
public android.bluetooth.BluetoothAdapter.LeScanCallback getSingleLeScanCallback()
@Implementation public boolean isDiscovering()
@Implementation public boolean isEnabled()
@Implementation public boolean enable()
@Implementation public boolean disable()
@Implementation public String getAddress()
@Implementation public int getState()
@Implementation public static boolean checkBluetoothAddress(String address)
Alphabetic characters must be uppercase to be valid.
address - Bluetooth address as stringpublic void setAddress(String address)
public void setState(int state)
public void setEnabled(boolean enabled)
Copyright © 2015. All rights reserved.