Bluetooth Peripherals
Native Android ==> Bluetooth module
This project integrates Bluetooth LE device support with the Validic Mobile Inform SDK to collect data from supported Bluetooth Low Energy devices on behalf of an end user. You may pair (if required by the specific Bluetooth device), read, and passively read Bluetooth devices. Read (also known as foreground read) is used to read while the app is in the foreground. Passive read is used to continue to listen for new readings while the app is backgrounded.
BluetoothPeripheral
A BluetoothPeripheral represents a Bluetooth profile to be used when interacting with Bluetooth Low Energy devices. To retrieve a List of supported perpherals simply call:
List<BluetoothPeripheral> supportedPeripherals = BluetoothPeripheral.getSupportedPeripherals();
for (BluetoothPeripheral peripheral :supportedPeripherals) {
Log.v("Test","Found peripheral: "+peripheral.getName());
}
An instance of a BluetoothPeripheral can be retrieved via its peripheralID property
BluetoothPeripheral peripheral = BluetoothPeripheral.getBluetoothPeripheral(18); // Foracare IR20b Thermometer
Generic Bluetooth Peripherals
Peripheral profiles exist for interacting with Bluetooth Devices that adhere to communication specifications defined by the Bluetooth Special Interest Group (SIG).
Unlike custom-supported peripherals, these generic peripherals have generic information in the BluetoothPeripheral object. The intended implementation is you either filter these peripherals from your view, if you do not want to display them to your end users, or you substitute in your own device name, image, and instructions within your app so that end users see device information that's applicable to the specific device(s) you wish to support.
To use these profiles retrieve an instance of a BluetoothPeripheral with a peripheralID from below.
1000 - Blood Glucose
2000 - Pulse Oximeters
3000 - Blood Pressure Monitors
4000 - Health Thermometers
5000 - Body Weight Scales
BluetoothPeripheral bluetoothPeripheral = BluetoothPeripheral.getBluetoothPeripheral(1000); // Blood Glucose Profile
Updated 4 days ago