I would like to develop a micro app that adds the location when it SCAN BLE beacon
… as beacons are in a truck.
What would you recomend in term of code, to do in sequence
Every x hours,
- Launch a GPS fix
- Once fix is OK … launch the BLE scan
Thks
I would like to develop a micro app that adds the location when it SCAN BLE beacon
… as beacons are in a truck.
What would you recomend in term of code, to do in sequence
Every x hours,
Thks
Something like this maybe:
var lastKnownLocation = null;
timers.repeat('4 hours', () => {
location.startUpdates((location) => {
// fix found
lastKnownLocation = location;
location.stop();
})
.then(() => {
ble.startScan((scanResult) => {
// process scan results
}, '1 min')
.then(() => {
// BLE scan is done, upload location and BLE scan results to Cloud?
});
});
});