public static interface BTConnectHelper.Listener
Modifier and Type | Method and Description |
---|---|
void |
bluetoothState(boolean isOff)
if bluetooth on / off by android system, will be called.
|
void |
changedBondedState(android.bluetooth.BluetoothDevice device,
int state) |
void |
discoveryFinished(boolean foundDevice,
boolean isBonded)
this call back will be trigger by bluetooth discovery stop or over reconnect count, founded device.
|
void |
discoveryTryCnt(int tryCnt,
int maxTryCnt,
boolean foundTargetDevice)
this function will be called when discovery started and you can make stop discovery with tryCnt and maxTryCnt.
|
void |
foundBTDevice(android.bluetooth.BluetoothDevice device,
boolean isCorrectDevice,
boolean isBonded)
this listener will be call when found bluetooth device each by each
|
void bluetoothState(boolean isOff)
void foundBTDevice(android.bluetooth.BluetoothDevice device, boolean isCorrectDevice, boolean isBonded)
device
- founded bluetooth deviceisCorrectDevice
- if this bluetooth device is selected device, will be trueisBonded
- if it's not bonded device, you can call create bond.void changedBondedState(android.bluetooth.BluetoothDevice device, int state)
device
- bonded changed bluetooth device.state
- has BluetoothDevice.BOND_BONDED or BluetoothDevice.BOND_NONE, BluetoothDevice.BOND_BONDINGvoid discoveryFinished(boolean foundDevice, boolean isBonded)
foundDevice
- isBonded
- void discoveryTryCnt(int tryCnt, int maxTryCnt, boolean foundTargetDevice)
tryCnt
- discovery current cntmaxTryCnt
- discovery max cnt, this is set by startDiscovery functionfoundTargetDevice
- if found target device, you can stop or keep going discovery. if you need show all bluetooth devices, ignore this.