William Pettersson
128b95cd83
Fix voice announcement rounding problem
...
We extracted integral parts before rounding, but String.format does
rounding which caused occasional issues. To alleviate, we need to round
before passing to String.format. All this rounding logic has now been
moved into appendDecimalUnit, and tests have been added to check that
rounding works correctly.
Fixes : #1285
2022-06-19 16:39:46 +02:00
Dennis Guse
b822d05a78
Fix voice announcement tests.
2022-06-09 22:33:43 +02:00
Dennis Guse
9cf88c00b0
Voice announcements: time is moving time (settings).
2022-06-06 17:02:31 +02:00
Jonas Kalderstam
00351136f2
Voice announcements: added settings for what to announce
2022-06-06 17:02:31 +02:00
Dennis Guse
5d2414977b
TrackRecordingService: remove pause functionality.
...
Fixes #1233 .
2022-05-23 07:41:50 +02:00
Dennis Guse
40d2bf0c22
Bluetooth: use TrackRecording handler for callback.
...
Otherwise the thread is not defined and a SecurityException may be triggered when inserting data into the ContentProvider.
Sadly, below API26 this needs to be done manually.
Fixes #1165 .
2022-05-11 20:56:52 +02:00
Dennis Guse
a5b44175a3
Convert metricUnits boolean into an enum.
...
Fixes #1199 .
2022-04-28 22:35:38 +02:00
Dennis Guse
18b21a6a3e
Bugfix: prevent race condition in TrackPointCreator.
...
This race condition leads to a crash in TrackStatisticsUpdater as the time might appear to move backwards if the created TrackPoints are not stored in order. Might happen if multiple sensors (BLE or GPS) are used in simultaneously.
Every method affected by a race condition is now synchronized.
Problem was introduced in c4b8082efc
Fixes #1151 .
2022-04-23 12:48:19 +02:00
Dennis Guse
dd1c5667a0
Adhere to recording distance interval for TrackPoint storage.
...
Part of #1059 .
2022-04-10 12:57:12 +02:00
Peter Storch
e61b065f2b
fix #1139 CI build
...
- fix NPEs in TrackPointCreator.fill()
- fix locale dependant tests
- wait for UI components
- extract utility functions into EspressoUtils
2022-03-13 01:28:10 +01:00
Jonas Kalderstam
9e7e8c60a6
Voice announcement: added TtsSpans to announcements
...
Fixes #876
2022-03-01 10:09:00 +01:00
Jonas Kalderstam
1075021e21
Voice announcement: added heart rate info to voice announcements
...
Also added setting to toggle announcement of heart rate
Defaults to off to preserve current behavior
2022-03-01 09:58:29 +01:00
Dennis Guse
30f9b6ffdc
Cleanup in VoiceAnnouncement: rename to start() and stop().
2022-02-14 22:01:52 +01:00
Dennis Guse
a7fd6b8dfa
TrackRecordingService: call stopSelf after triggering post-workout export.
...
Might fix #1080 .
2022-02-14 22:01:52 +01:00
Dennis Guse
cf32c81035
Cleanup: extract RecordingData and RecordingStatus from TrackRecordingService.
2022-02-14 22:01:52 +01:00
Dennis Guse
19a958ccbb
Cleanup.
2022-01-29 19:21:54 +01:00
Dennis Guse
708245bd50
TrackRecordingServices: managers register for sharedPreference changes.
2022-01-27 22:04:45 +01:00
Dennis Guse
88c4e1a109
Package structure: moved sensors.
...
Part of #963 .
2022-01-15 22:24:59 +01:00
Dennis Guse
0645628d7e
Package structure: moved models and database.
...
Part of #963 .
2022-01-15 22:24:59 +01:00
Dennis Guse
5053c41bec
Package structure: moved intervals.
...
Part of #963 .
2022-01-15 22:07:53 +01:00
Dennis Guse
58b1396d64
Refactoring package structure.
...
Part of #963 .
2022-01-12 22:57:35 +01:00
Dennis Guse
a9f1381dae
Refactoring package structure.
...
Part of #963 .
2022-01-12 22:42:23 +01:00
Dennis Guse
e508c53ca9
TrackRecordingManager: store GPS-based TrackPoints based upon the distance to the previously stored GPS-based TrackPoint.
2022-01-12 18:07:48 +01:00
Dennis Guse
cd7bf36aa9
TrackRecordingService: add integration tests.
2022-01-09 18:28:35 +01:00
Dennis Guse
ab07d3b130
TrackRecordingService: re-worked TrackPoint recording tests for state changes.
2022-01-09 18:28:35 +01:00
Dennis Guse
8b5320e40e
TrackRecordingService: cleanup tests.
2022-01-09 18:28:35 +01:00
Dennis Guse
ef15632d7b
TrackRecordingService: refactored and unified tests.
2022-01-09 18:28:35 +01:00
Dennis Guse
f5ce76955b
TrackRecordingService: add tests for state changes.
2022-01-09 18:28:35 +01:00
Dennis Guse
1163f74b98
SENSORPOINT and TRACKPOINT require a distance to be stored.
...
TrackRecording and TrackStatisticsUpdater.
Part of #500
Fixes #1074 .
2022-01-06 22:12:53 +01:00
Dennis Guse
c4b8082efc
Bluetooth sensors: event-driven TrackPoint creation.
...
Part of #500 .
2022-01-06 22:12:53 +01:00
Dennis Guse
dbc29a88ce
Cleanup: removed useless tests.
2022-01-06 22:12:53 +01:00
Dennis Guse
7d0d87e962
Tests: ServiceTestRule does not (always) restart the service.
...
Thus, resetting it's status is not happening and then leading to failures in subsequent tests.
Fixes #1058 .
2021-12-28 13:05:24 +01:00
Dennis Guse
c7bbaddc06
Cleanup: fix various issues in tests.
2021-12-28 13:05:24 +01:00
Dennis Guse
77f56a5376
Test: disable automatic creation of TrackPoints for tests.
...
Part of #500 .
2021-12-28 13:05:24 +01:00
Dennis Guse
ba66c45005
Recording data from BLE sensors alone (need to provide distance).
...
GPS is optional in this case, but no coordinates will be available.
Naive implementation tries to store data every second using the UI timer.
Part of #500 .
2021-12-28 13:05:23 +01:00
Dennis Guse
45125bcda3
Refactor: rename LocationHandler to GPSHandler.
2021-12-28 13:05:23 +01:00
Dennis Guse
530967f4f6
Moving time: disable test on API23.
2021-12-21 17:46:23 +01:00
Dennis Guse
25e590da02
Moving time: re-implement idle/non-idle TrackPoints.
...
Simplify computation of TrackStatistics.
Part of #1046 .
2021-12-19 22:01:35 +01:00
Dennis Guse
0be4b25508
Moving time: fix test.
...
Part of #1046 .
2021-12-19 21:56:53 +01:00
Dennis Guse
4c7d9384fb
Revert "Only record a TrackPoint if the traveled distance is greater than recording distance interval."
...
This reverts commit 08ba7d50c7 .
Fix #1046 .
2021-12-19 21:56:53 +01:00
Dennis Guse
1f0a99c49a
Recording: ignore TrackPoints that contain sensor data and do not fulfill recording distance interval.
...
Follow-up to 08ba7d50c7
Part of #1027 .
2021-11-20 19:43:38 +01:00
Dennis Guse
08ba7d50c7
Only record a TrackPoint if the traveled distance is greater than recording distance interval.
...
Code seemed to be a leftover from the removed idle/non-idle functionality.
Fixed #1007 .
Co-authored-by: vlmendz <91810638+vlmendz@users.noreply.github.com >
2021-11-08 22:42:14 +01:00
Dennis Guse
62401b2c5c
Cleanup.
2021-11-07 22:19:02 +01:00
Román Martínez
083b620e41
GPS data recording: remove idle/non-idle changes due to reported speed greater than 0.5mph.
...
This avoids that to storing GPS locations if the user r actually is not moving (likely bad GPS reception).
Fixes #968 .
Co-authored-by: vlmendz <91810638+vlmendz@users.noreply.github.com >
Co-authored-by: Dennis Guse <dennis.guse@alumni.tu-berlin.de >
2021-10-18 23:26:07 +02:00
Dennis Guse
d07ab3cc22
TrackRecordingManager: do not store altitude changes twice (previous …
...
…TrackPoint's storage was delayed).
Fixes #969 .
2021-10-16 10:23:09 +02:00
Dennis Guse
90493ae498
TrackRecordingManager: do not store sensor distance twice (previous TrackPoint's storage was delayed).
...
Fixes #969 .
2021-10-16 10:23:09 +02:00
Dennis Guse
52a110d998
Bugfix: reset on SensorDataSet should only take place if the TrackPoint was stored
...
Fixes #969 .
2021-10-16 10:23:09 +02:00
Ristello
8079a25a42
Use an in-memory database when running instrumented tests.
...
- added new TestRunner and new TestApplication
- The TestRunner loads TestApplication as the apps Application instance when running the tests
- added new interface AppConfig to retrieve the database name
- changed Startup (Application) so that it implements AppConfig
- changed CustomSQLiteOpenHelper so that it retrieves the database name from the Application instance
- Startup provides the production database name
- TestApplication provides null which yields an in-mememory database
2021-10-13 22:02:38 +02:00
Dennis Guse
0527e4ab14
Cleanup: move AnnouncementUtils to VoiceAnnouncement.
...
Part of #963
2021-10-12 22:24:51 +02:00
Dennis Guse
b6b4c5aa39
Cleanup: move PreferencesUtils into settings package.
...
Part of #963
2021-10-12 22:24:51 +02:00