-
public interface BluetoothPeripheralControllerListener
The BluetoothPeripheralControllerListener protocol provides callbacks to indicate the status of a pairPeripheral() or readFromPeripheral() operation. When performing a readFromPeripheral() operation you should listen for the BluetoothPeripheralController#onPeripheralDiscovered() callback and then display to the user the readingInstructions from the BluetoothPeripheral object. Upon receiving a reading or readings from the peripheral, the library will execute the callback, onSuccess() and the boolean return of that callback will permit the library to submit the reading(s).
-
-
Method Summary
Modifier and Type Method Description abstract void
onPeripheralDiscovered(BluetoothPeripheralController peripheralController, BluetoothPeripheral peripheral)
Callback indicating a peripheral has been found during scanning abstract boolean
onSuccess(BluetoothPeripheralController peripheralController, BluetoothPeripheral peripheral, List<Record> records)
Callback passing back the Record object with the measurement data received from the peripheral Notifies of the reading and asks if the record should be submitted to the Validic server abstract void
onFail(BluetoothPeripheralController peripheralController, BluetoothPeripheral peripheral, BluetoothError error)
Callback indicating attempt to pair or to get a reading from the peripheralController failed -
-
Method Detail
-
onPeripheralDiscovered
abstract void onPeripheralDiscovered(BluetoothPeripheralController peripheralController, BluetoothPeripheral peripheral)
Callback indicating a peripheral has been found during scanning
-
onSuccess
abstract boolean onSuccess(BluetoothPeripheralController peripheralController, BluetoothPeripheral peripheral, List<Record> records)
Callback passing back the Record object with the measurement data received from the peripheral Notifies of the reading and asks if the record should be submitted to the Validic server
- Parameters:
peripheralController
- The bluetooth peripheral controller from which the reading was takenrecords
- The list of readings just taken.
-
onFail
abstract void onFail(BluetoothPeripheralController peripheralController, BluetoothPeripheral peripheral, BluetoothError error)
Callback indicating attempt to pair or to get a reading from the peripheralController failed
-
-
-
-