Passive Read
React Native ==> Bluetooth module
ValidicBluetooth
allows for registering a set of BluetoothPeripherals
to scan and read from automatically in the background. Collected Readings are automatically submitted to the Validic API. The peripherals are persisted across reboots. Use an array of BluetoothPeripheral.id
s to start reading in the background.
await ValidicBluetooth.setPassivePeripherals([1,14,15])
To get a list of BluetoothPeripheral IDs that are being scanning and read in the background
let backgroundPeripherals = await ValidicBluetooth.getPassivePeripherals()
Special Considerations
Android
If the host application is closed by the user and a Bluetooth Peripheral advertises a new reading the App will relaunch and collect the reading.
iOS
The host application must be at least launched in the background for readings to be collected from devices when they advertise an available reading
Updated 3 days ago