public final class AndroidBluetoothDevice extends java.lang.Object implements IBluetoothDevice
IBluetoothDevice
, and wraps BluetoothDevice
. This class is used by default
by the library, and the only time it should NOT be used, is when unit testing.BleDeviceConfig.bluetoothDeviceFactory
IBluetoothDevice.DefaultFactory, IBluetoothDevice.Factory
DEFAULT_FACTORY, NULL
Constructor and Description |
---|
AndroidBluetoothDevice(IBleDevice device) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancelBond() |
android.bluetooth.BluetoothGatt |
connect(android.content.Context context,
boolean useAutoConnect,
android.bluetooth.BluetoothGattCallback callback) |
boolean |
createBond() |
boolean |
createBondSneaky(java.lang.String methodName,
boolean loggingEnabled) |
boolean |
equals(IBluetoothDevice device) |
java.lang.String |
getAddress() |
BleDevice |
getBleDevice() |
int |
getBondState() |
java.lang.String |
getName() |
android.bluetooth.BluetoothDevice |
getNativeDevice() |
void |
init() |
boolean |
isConnected() |
boolean |
isDeviceNull() |
boolean |
removeBond() |
void |
setNativeDevice(android.bluetooth.BluetoothDevice device,
P_DeviceHolder deviceHolder) |
void |
updateBleDevice(IBleDevice device) |
public AndroidBluetoothDevice(IBleDevice device)
public void init()
init
in interface IBluetoothDevice
public BleDevice getBleDevice()
getBleDevice
in interface IBluetoothDevice
public void updateBleDevice(IBleDevice device)
updateBleDevice
in interface IBluetoothDevice
public int getBondState()
getBondState
in interface IBluetoothDevice
public java.lang.String getAddress()
getAddress
in interface IBluetoothDevice
public boolean isConnected()
isConnected
in interface IBluetoothDevice
public java.lang.String getName()
getName
in interface IBluetoothDevice
public boolean createBond()
createBond
in interface IBluetoothDevice
public boolean removeBond()
removeBond
in interface IBluetoothDevice
public boolean cancelBond()
cancelBond
in interface IBluetoothDevice
public boolean isDeviceNull()
isDeviceNull
in interface IBluetoothDevice
public boolean equals(IBluetoothDevice device)
equals
in interface IBluetoothDevice
public boolean createBondSneaky(java.lang.String methodName, boolean loggingEnabled)
createBondSneaky
in interface IBluetoothDevice
public void setNativeDevice(android.bluetooth.BluetoothDevice device, P_DeviceHolder deviceHolder)
setNativeDevice
in interface IBluetoothDevice
public android.bluetooth.BluetoothDevice getNativeDevice()
getNativeDevice
in interface IBluetoothDevice
public android.bluetooth.BluetoothGatt connect(android.content.Context context, boolean useAutoConnect, android.bluetooth.BluetoothGattCallback callback)
connect
in interface IBluetoothDevice