Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🤡 Switch the simulation code in the UI to use the mock objects
In e-mission/e-mission-data-collection#221 we have added a new method to the data collection interface that allows us to create mock BLE objects and save them using the native methods. This allows us to simulate the real world scenario more closely, by saving from the native code. while still avoiding hacks to real code. ---------------------------------- Android: ``` 04-13 13:34:28.204 13563 13563 I chromium: "state": "CLRegionStateInside" 04-13 13:34:28.204 13563 13563 I chromium: }", source: https://localhost/plugins/cordova-plugin-em-unifiedlogger/www/unifiedlogger.js (49) 04-13 13:34:28.222 13563 13763 I System.out: About to execute query SELECT data FROM userCache WHERE key = 'background/bluetooth_ble' AND type = 'sensor-data' AND write_ts >= 1.713040168E9 AND write_ts <= 1.713040468E9 ORDER BY write_ts DESC 04-13 13:34:28.241 13563 13763 W PluginManager: THREAD WARNING: exec() call to UserCache.getSensorDataForInterval blocked the main thread for 20ms. Plugin should use CordovaInterface.getThreadPool(). 04-13 13:34:28.253 13563 31932 D BuiltinUserCache: Added value for key background/bluetooth_ble at time 1.713040468221E9 04-13 13:34:28.273 13563 31932 D BuiltinUserCache: Added value for key background/bluetooth_ble at time 1.713040468254E9 04-13 13:34:28.319 13563 31932 D BuiltinUserCache: Added value for key background/bluetooth_ble at time 1.713040468276E9 04-13 13:34:28.351 13563 31932 D BuiltinUserCache: Added value for key background/bluetooth_ble at time 1.71304046832E9 04-13 13:34:28.371 13563 13563 I TripDiaryStateMachineRcvr: noarg constructor called 04-13 13:34:28.373 13563 31932 D BuiltinUserCache: Added value for key background/bluetooth_ble at time 1.713040468352E9 ``` iOS ``` 2024-04-13 13:38:22.029076-0700 emission[77938:10285250] DEBUG:[BLE] didRangeBeaconsInRegion 2024-04-13 13:38:22.029320-0700 emission[77938:10285250] DEBUG: [BLE] didRangeBeaconsInRegion 2024-04-13 13:38:22.031065-0700 emission[77938:10285250] DEBUG:{ } 2024-04-13 13:38:25.060123-0700 emission[77938:10285250] data has 174 bytes, str has size 174 2024-04-13 13:38:25.062087-0700 emission[77938:10285250] data has 174 bytes, str has size 174 2024-04-13 13:38:25.063593-0700 emission[77938:10285250] data has 173 bytes, str has size 173 2024-04-13 13:38:25.065085-0700 emission[77938:10285250] data has 175 bytes, str has size 175 2024-04-13 13:38:25.066255-0700 emission[77938:10285250] data has 175 bytes, str has size 175 2024-04-13 13:38:26.343114-0700 emission[77938:10285250] THREAD WARNING: ['DataCollection'] took '4307.931885' ms. Plugin should use a background thread. 2024-04-13 13:38:26.350811-0700 emission[77938:10285250] In TripDiaryStateMachine, received transition T_BLE_BEACON_FOUND in state STATE_ONGOING_TRIP 2024-04-13 13:38:26.350982-0700 emission[77938:10285250] DEBUG: In TripDiaryStateMachine, received transition T_BLE_BEACON_FOUND in state STATE_ONGOING_TRIP 2024-04-13 13:38:26.352531-0700 emission[77938:10285250] data has 92 bytes, str has size 92 2024-04-13 13:38:26.354445-0700 emission[77938:10285250] data has 69 bytes, str has size 69 2024-04-13 13:38:26.355964-0700 emission[77938:10285250] Got unexpected transition T_BLE_BEACON_FOUND in state STATE_ONGOING_TRIP, ignoring 2024-04-13 13:38:26.356106-0700 emission[77938:10285250] Ignoring silent push notification ```
- Loading branch information