Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
c69c934
Merge branch 'beta' into main_beta_bridge
tinazhang128 Dec 8, 2023
ac6e317
Merge branch 'beta' into main_beta_bridge
tinazhang128 Dec 8, 2023
d721390
Merge branch 'beta' into main_beta_bridge
tinazhang128 Dec 11, 2023
584cd76
Merge pull request #22 from awareframework/main_beta_bridge
tinazhang128 Dec 11, 2023
183b172
4.1.5.light.bundle APK files
tinazhang128 Dec 12, 2023
99aecfb
Merge pull request #23 from awareframework/main_beta_bridge
tinazhang128 Dec 13, 2023
6c41346
Fix screentext(#32) and crash (#34) on accessibility enable
EcZww Apr 7, 2024
d0aa525
fix: rename the plugin API in Gradle file
EcZww Apr 11, 2024
e4f7efe
Fix premature text buffer reset on app changes
EcZww Apr 21, 2024
49dcf56
commit the screenText data to database on app changes
EcZww Apr 22, 2024
1ecc324
Update Applications.java
BinLiang-Eric Jun 2, 2024
d2b7396
delete max titile limit
BinLiang-Eric Aug 19, 2024
77b5537
update esm question title display logic
BinLiang-Eric Aug 20, 2024
d5b9219
fix reschedule second day random esm issue
BinLiang-Eric Oct 18, 2024
5683ee3
update change log && APK for 4.1.6
BinLiang-Eric Oct 23, 2024
c5a178a
Update CHANGES.txt
BinLiang-Eric Oct 23, 2024
d3005a2
Update CHANGES.txt
BinLiang-Eric Oct 23, 2024
45b457c
Merge pull request #47 from awareframework/fix/update-fixed-code
tinazhang128 Oct 23, 2024
77a5c8a
Merge branch 'beta'
BinLiang-Eric May 23, 2025
1a376cc
Update aware.gradle
BinLiang-Eric May 23, 2025
b040e74
update change log and version number
BinLiang-Eric May 23, 2025
a073457
Merge remote-tracking branch 'origin/beta' into bridge-merge
BinLiang-Eric May 23, 2025
038f1fe
Merge remote-tracking branch 'origin/beta' into bridge-merge
BinLiang-Eric May 23, 2025
598d1fb
update package
BinLiang-Eric May 23, 2025
f77e873
Merge pull request #55 from awareframework/bridge-merge
tinazhang128 May 23, 2025
c0f703d
aware-phone: request only core permissions at startup
va13k Jul 6, 2026
4d4f8d0
aware-phone LEGACY: Enable only necessary sensors
va13k Jul 8, 2026
281befa
aware-phone: Add consistent dialog window settings
va13k Jul 8, 2026
ceb3f32
Fix the process of quitting a study
va13k Jul 8, 2026
2dbaf4f
study view: base for study-info/history improvements
va13k Jul 8, 2026
c9cd2fb
Improve the study info view
va13k Jul 9, 2026
3fbfbb5
study: fix join/quit/rejoin track and sync exit
va13k Jul 9, 2026
56b1ec5
study view: shared study card + joined studies
va13k Jul 9, 2026
831da6f
fix: stop accessibility request loop
va13k Jul 10, 2026
2e8d029
feature: display whether a sensor collects data
va13k Jul 10, 2026
6d2a301
feature: apply config diff + notify which sensors were changed
va13k Jul 10, 2026
0a7cdd7
build: stop tracking apks + drop jars/dead config
va13k Jul 13, 2026
dba5c33
fix: serialize study config, save settings of reset()
va13k Jul 13, 2026
9d5c496
fix: lock/unlock study settings with enable_config_update
va13k Jul 13, 2026
5ea555f
fix: reliably notify participants of study updates
va13k Jul 13, 2026
f39f33e
feature: enforce Location services for WiFi collection
va13k Jul 13, 2026
2d58d62
fix: Wi-Fi sensor location enforcement
va13k Jul 13, 2026
6d6fffc
feat: per-sensor consent screen after joining
va13k Jul 13, 2026
964984d
fix: crash loops in ambient_noise & openweather plugins
va13k Jul 13, 2026
6215022
security: stop exposing API key in UI and source
va13k Jul 14, 2026
b809937
fix: find active study by enrollment state
va13k Jul 14, 2026
6c37754
plugin-crash-fixes: ambient_noise isSilent + sample-size race fix
va13k Jul 14, 2026
c37bc69
build: remove dead offloadData() overload + unused sync
va13k Jul 14, 2026
b456c44
Merge remote-tracking branch 'fork/ux-fix'
va13k Jul 14, 2026
b8dc333
Merge remote-tracking branch 'fork/sensor-consent-screen'
va13k Jul 14, 2026
8c5e3e1
Merge remote-tracking branch 'fork/plugin-crash-fixes'
va13k Jul 14, 2026
2357c07
Merge remote-tracking branch 'fork/build-hygiene'
va13k Jul 14, 2026
2213609
fix: Add missing consents + consistent consent check
va13k Jul 15, 2026
6e88905
feat: Add generalization functions for right parse
va13k Jul 15, 2026
053393c
fix: Apply fixed parse to missing sensors
va13k Jul 15, 2026
a01d931
test: Add unit tests to fixed parse
va13k Jul 15, 2026
f52cf16
fix: Apply the parse helper to missing sensors
va13k Jul 15, 2026
ca9cebd
fix: Correct config sync + save config state
va13k Jul 15, 2026
b2cacad
test: Add the unit tests for config sync
va13k Jul 15, 2026
0411d9b
Merge branch 'fix/consents'
va13k Jul 15, 2026
fb4e77f
Merge branch 'fix/crash-on-update'
va13k Jul 15, 2026
24b3e79
Merge branch 'fix/sync-config'
va13k Jul 15, 2026
f3d4c99
feat: Add hardware detector helper
va13k Jul 15, 2026
a12f8a5
refactor: Delegate hardware check to the helper
va13k Jul 15, 2026
1a8e52b
fix: Exclude hardware-blocked sensors from config sync
va13k Jul 15, 2026
ab51fa9
test: Add unit tests for hardware-exclusion
va13k Jul 15, 2026
dc540bf
feat: Add a dedicated file for sensor diagnostic
va13k Jul 15, 2026
18fa233
feat: Apply the diagnostics logging
va13k Jul 15, 2026
30dffbf
test: Add unit tests for diagnostic utility
va13k Jul 15, 2026
b636f75
Merge branch 'refactor/sensor-hardware-detection'
va13k Jul 15, 2026
1a26e5c
Merge branch 'feat/sensor-diagnostic-log'
va13k Jul 15, 2026
e598713
fix: Update wrong description of the sensor freqs
va13k Jul 16, 2026
3618328
feat: Add util funcs for sensor time sampling
va13k Jul 16, 2026
b819d7a
fix: Apply util functions to sensors
va13k Jul 16, 2026
6e83806
test: Add unit tests for frequency units utils
va13k Jul 16, 2026
7facb04
Merge branch 'fix/frequency-revision'
va13k Jul 16, 2026
227bc97
feat: replace raw frequency inputs
va13k Jul 20, 2026
fa29748
feat: Set the default values + sensor-specific dropdown
va13k Jul 20, 2026
6304893
feat: change freq setting to dropdown noise/weather plugin
va13k Jul 20, 2026
ae4efac
fix: Remove redundant _ID declaration
va13k Jul 20, 2026
23b736a
Merge branch 'main' into beta
va13k Jul 21, 2026
2ccf728
feat: Add correct GET_ACCOUNTS handling
va13k Jul 22, 2026
862784c
fix: Remove READ_CONTACTS request
va13k Jul 22, 2026
c6ab920
fix: Harden Bluetooth runtime permission handling
va13k Jul 22, 2026
8f8e372
feat: Persist and enforce per-sensor study consent
va13k Jul 22, 2026
09ca65c
fix: Hold requiring consents off on program joins
va13k Jul 22, 2026
c20227a
fix: Sequence accessibility and location prompts
va13k Jul 22, 2026
16ce602
fix: Add prompt for permissions individually
va13k Jul 22, 2026
3ee7e29
fix: Keep consent after the screen is recreated
va13k Jul 22, 2026
0090369
fix: Sequence requests and prevent denial loops
va13k Jul 23, 2026
d2b4a96
test: Add unit tests for PermissionSequence
va13k Jul 23, 2026
a6759d7
feat: Add custom sampling rates in Hz
va13k Jul 23, 2026
724260a
test: Add unit tests for frequency converter
va13k Jul 23, 2026
f741eca
feat: Add consistent frequency diagnostic states
va13k Jul 23, 2026
692027d
test: Add unit tests for Diagnostics/Freshness
va13k Jul 23, 2026
6f2bd6c
feat: Expose actionable sensor collection status
va13k Jul 23, 2026
862ceb9
test: Add unit tests for actionable sensor status
va13k Jul 23, 2026
bd622f8
fix: Avoid redundant preference refreshes for old UI
va13k Jul 23, 2026
8d51d50
fix: Avoid redundant preference refreshes for plugins
va13k Jul 23, 2026
2bab9fb
feat: preserve and approve participant configs
va13k Jul 23, 2026
1805939
test: Add unit tests config persistence + sync
va13k Jul 23, 2026
b355325
fix: Require exit acknowledgement before leaving
va13k Jul 23, 2026
825645a
fix: Collect network traffic at configured intervals
va13k Jul 23, 2026
9f6ce93
test: Add coverage for network traffic sampling
va13k Jul 23, 2026
b1638a3
fix: Prevent background permission request loops
va13k Jul 24, 2026
a156036
test: Add unit tests for Permission flow decline
va13k Jul 24, 2026
db9ed1c
fix: make screenshot capture lifecycle idempotent
va13k Jul 24, 2026
c0e626d
fix: Stabilize background services
va13k Jul 24, 2026
58bed2f
fix: Stabilize ambient noise collection
va13k Jul 24, 2026
138c61b
fix: Prevent ESM timers from blocking study joins
va13k Jul 24, 2026
227317f
fix: Ignore unavailable sensors during config updates
va13k Jul 24, 2026
45bfee3
fix: Limit study config sync requests
va13k Jul 24, 2026
ce2f76a
feat: Add concrete pre-join sensor and plugin consent
va13k Jul 24, 2026
f06a997
test: Add unit test on the processor availability
va13k Jul 24, 2026
2d05dd3
test: Add unit tests for consent grouping + config
va13k Jul 24, 2026
b6a4e20
test: Add unit test for ConsentGrouping
va13k Jul 24, 2026
b75a6da
fix: Improve background collection notification
va13k Jul 24, 2026
816424e
feat: Add redact func for hiding sensitive data in logs
va13k Jul 27, 2026
522c561
fix: Remove the jdbc log password exposure + newInstance
va13k Jul 27, 2026
9a773b2
feat: Apply log redact on sensitive exposure
va13k Jul 27, 2026
336c068
test: Add tests for LogRedactor
va13k Jul 27, 2026
052b4c6
feat: DB password re-auth, safe exit upload + ack
va13k Jul 27, 2026
25d2dd8
feat: make quit effective + pswd re-auth prompt
va13k Jul 27, 2026
e2f693e
fix: Add correct and consistent config + pswd handling
va13k Jul 28, 2026
ccb6aae
test: Add unit tests for url validation
va13k Jul 28, 2026
b29174a
test: Add unit tests for config validation
va13k Jul 28, 2026
ae6612a
fix: Remove dead study-config validation paths
va13k Jul 28, 2026
0003ae4
fix: Insert aware_device row only on a real device change
va13k Jul 28, 2026
cabe4fc
test: Add unit tests for device facts comparison
va13k Jul 28, 2026
41be8d7
fix: Commit batches in atom and report SQL warns
va13k Jul 28, 2026
d32bddb
test: Add unit tests for sql warns
va13k Jul 28, 2026
171e860
fix: Bound upload batches by payload size
va13k Jul 28, 2026
cba2303
test: Add unit tests for sync batch payload budget
va13k Jul 28, 2026
d425217
fix: Correct misleading sync debug messages
va13k Jul 28, 2026
ad602b4
fix: Keep drop columns from aborting a schema upgrade
va13k Jul 29, 2026
e9f3e51
test: Add unit tests for declared column parsing
va13k Jul 29, 2026
7272c48
fix: Check the research db's certificate on upload
va13k Jul 29, 2026
17d0ef8
test: Add unit tests for MySQL trust store params
va13k Jul 29, 2026
8657aed
fix: Track upload progress in its own table
va13k Jul 29, 2026
0d53d43
fix: Keep one aware_device row per device
va13k Jul 29, 2026
3fedab2
fix: Record the kind of each log entry
va13k Jul 29, 2026
dd32fe0
fix: Send the study config only when it changes
va13k Jul 29, 2026
0f50d44
fix: Stop sending device info to awareframework
va13k Jul 29, 2026
09dc59c
test: Add unit tests for the framework schema
va13k Jul 29, 2026
1373586
feat: Show each sensor's data has been delivered
va13k Jul 29, 2026
4f0e449
fix: Keep index creation from aborting schema upgrades
va13k Jul 30, 2026
38571b6
test: Add unit tests for the time-device index guard
va13k Jul 30, 2026
95141cc
fix: Apply the study config when the database is down
va13k Jul 30, 2026
1e69a1f
test: Add unit tests for config applicability
va13k Jul 30, 2026
959a5c8
fix: Keep the consent screen alive across rotation
va13k Jul 30, 2026
acf9b4b
feat: Notify participants when a study needs them
va13k Jul 30, 2026
5b9d57f
feat: Read the research db CA from the study config
va13k Jul 30, 2026
026b2f3
test: Add unit tests for the unverified TLS fragment
va13k Jul 30, 2026
0ebb31d
feat: Warn when data stops reaching the db
va13k Jul 30, 2026
dee5ca3
feat: Show data delivery status on the main screen
va13k Jul 30, 2026
1951e78
test: Add unit tests for upload health
va13k Jul 30, 2026
5042b3b
fix: Count delivered data as data the sensor collected
va13k Jul 30, 2026
02a74f7
test: Add unit tests for observed sensor data
va13k Jul 30, 2026
374da58
style: Drop javadoc paragraph tags
va13k Jul 30, 2026
4c8450f
update change log for 4.8.1.beta
va13k Jul 30, 2026
9b72967
fix: Compare each magnetometer axis against its value
va13k Jul 31, 2026
98b1cc6
update change log for 4.8.1.beta
va13k Jul 31, 2026
99de9fd
feat: Add recommended sensitivity threshold per sensor
va13k Jul 31, 2026
45bdc3b
test: Add unit tests for sensor thresholds
va13k Jul 31, 2026
0c3fac6
update change log for 4.8.1.beta
va13k Jul 31, 2026
9299f7e
fix: Stop a stalled upload from blocking every table
va13k Jul 31, 2026
2161a1d
test: Add unit tests for upload connection bounds
va13k Jul 31, 2026
ba6c5de
fix: Keep collecting locations after a config update
va13k Jul 31, 2026
7fb518d
fix: Report delivery failures per sensor
va13k Jul 31, 2026
72dfb8d
test: Add unit tests for the health sensor check
va13k Jul 31, 2026
dee868b
update change log for 4.8.1.beta
va13k Jul 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@ aware-phone/release/*
.DS_Store
.DS_Store?
local.properties

# Built release APKs: these are build output, not source, and were being committed on every
# rebuild (~6MB each x 5 ABI variants) — see resources/ below, which had 15 revisions across them
# bloating .git well past what removing the current copies alone would show.
*.apk

*.jks
*.keystore
99 changes: 67 additions & 32 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,61 +1,96 @@
Change log for AWARE
4.7.3.beta
- add column for record bluetooth connection status

4.8.1.beta
- Sensor and plugin consent is now shown before joining a study instead of after, and covers the plugins a study needs as well as its sensors, grouped into labelled sections
- Leaving a study now always completes on the device, even when the research database cannot be reached; telling the researcher is best-effort, and the exit record states when it could not be delivered
- New: when a researcher changes a study's database password, the app tells a rejected password apart from a database that is simply down, asks the participant to re-enter it, and pauses uploads until it is accepted
- Fixed joining a study from a link or QR code, which crashed before any validation had run
- A study that needs a participant-entered password can now be joined from a link or QR code; the app asks for the password instead of failing with nothing the participant can do
- Join failures now say what is actually wrong: an invalid configuration, a missing password, a wrong password, or a database that cannot be reached. An unreachable database is no longer reported as a wrong password
- Study addresses are checked before anything is downloaded, so a missing or malformed address gives a message instead of failing silently
- When several study config checks are triggered at once, the app now runs one check instead of queuing every request
- The app now stops waiting for a study configuration that does not answer in time, and refuses a configuration file larger than 5 MB
- Sensors whose hardware the device does not have are now also ignored when a config update is applied, not only on first sync
- Fixed a background timer that kept a processor core busy for hours for every pending ESM questionnaire
- Fixed a pending ESM questionnaire preventing a study join from ever starting
- The background collection notice is now always visible and silent, says that study data is being collected, and opens the app when tapped; added the notification permission that Android 13 and later require
- Fixed screenshot capture restarting in a loop and creating a new capture session on every background service start
- Fixed MQTT failing to start on an empty or malformed port, keep-alive, or quality-of-service setting
- Fixed a worker thread being leaked on every restart of the background service
- Fixed a scheduled action failing the whole scheduler when it pointed at something no longer installed or carried an unreadable value
- Further Ambient Noise collection stability fixes
- Fixed repeated permission requests looping in the background after a permission was denied
- Security: database passwords are no longer written to the device log, including the database connection log
- Security: password, secret, and token values are masked in logged study configuration and study data
- Security: uploads are always encrypted, and a study that publishes its database's certificate authority in its configuration also gets the server's identity verified, so data reaches that study's server and no other host. A study that publishes no authority still gets an encrypted connection, but the server it connects to is not verified
- Upload progress is tracked in its own table, so each table is uploaded once instead of being re-sent from the beginning whenever the log was cleared
- Device information is now one row per device, rewritten when the device's hardware or Android version actually changes, and the server records a row per change
- Device information drops four fields that carried no information: the serial (which Android stops reporting), the build type, the device label, and the brand (the manufacturer says the same thing)
- Log entries now carry the kind of entry they are, so restarts, schedules, uploads, study changes and sensor diagnostics can be counted separately
- Study rows now record when the configuration was last updated, name the join and re-join events explicitly, and carry the configuration only on the rows where it changed
- Device information is no longer sent to awareframework.com when a device is first recorded
- Fixed the on-device database never upgrading: a schema change was aborted part-way and silently rolled back, so several releases' worth of database changes had never reached a phone that already had AWARE installed. Upgrades now complete, keeping existing data, and a failed upgrade is recorded instead of being discarded
- A study configuration is now applied even while the research database is unreachable. Only the upload waits for the database to come back; the participant is no longer told every minute that their study configuration is broken when nothing is wrong with it
- A wrong database password and an unreachable database now give different messages when the study configuration is checked
- Fixed a crash when the screen was rotated while a study was being joined
- New: the participant is told when the study needs something from them — a study password, or consent for sensors a researcher has newly added — as a notification, so a paused study is noticed without opening the app. Notifications appear only for changes that need a decision: a frequency-only change is applied quietly
- New: the main screen shows how far collected data has reached the research database, and each sensor shows the same alongside when it last recorded
- New: the participant is told when data stops reaching the research database, and told once rather than repeatedly. Data continues to be collected and kept on the device until it can be sent. Researchers see when delivery started failing, why, and when it recovered
- Fixed sensors reporting that they had never collected anything once their data had been uploaded and cleared from the device; the status and the researcher diagnostics now count delivered data as data the sensor collected
- Fixed the magnetometer comparing one axis against the wrong two when deciding whether a reading changed enough to record, which made any magnetometer threshold keep and drop readings unpredictably
- Sensor sensitivity settings (accelerometer, barometer, gravity, gyroscope, light, linear accelerometer, magnetometer, proximity, rotation, temperature) changed from raw numeric entry to descriptive presets stated in each sensor's own unit, with recommended values per sensor. A sensitivity larger than the sensor's readings ever change by is refused, and one already set that way now says the sensor is recording nothing instead of showing the number alone
- Fixed a single sensor's delivery failure being hidden by the other sensors still delivering: whether data is reaching the research database is now tracked per sensor rather than as one flag for the whole upload. The main screen names the sensors that are not delivering, and a sensor that recovers no longer clears a warning that belongs to a different one. Researchers see each affected sensor's failure and its recovery separately
- Fixed location collection stopping permanently the first time a study configuration was applied, and never resuming for as long as the app kept running, while the location sensor still reported itself as active. GPS, network and passive location are now re-registered when the sensor restarts
- Fixed an upload waiting indefinitely when the research database accepts the connection and then stops answering. The wait is now bounded, so the stall is reported to the participant and the researcher instead of passing unnoticed for hours, and one stalled table no longer holds back every other table's upload. Collection is unaffected either way and data is kept on the device until it can be sent

4.8.0.beta
- Sensor sampling-rate settings (accelerometer, barometer, gravity, gyroscope, light, magnetometer, proximity, rotation, temperature, location, Wi-Fi/Bluetooth scanning, processor, Ambient Noise, OpenWeather) changed from raw numeric entry to descriptive dropdown presets, with more sensible default frequencies per sensor
- New sensor diagnostic logging: when a sensor isn't collecting data, the reason (missing hardware, permission, or accessibility) is now recorded so researchers can see it in the synced data
- Sensors without supported hardware are now excluded from study config sync instead of silently failing to apply
- Fixed study config sync not always saving and applying updated settings correctly
- Added missing consent requests for some sensors; consent checks are now consistent across all sensors
- New per-sensor consent screen shown after joining a study
- Fixed crash loops in the Ambient Noise and OpenWeather plugins
- Wi-Fi scanning now correctly enforces the device's Location services toggle
- Redesigned study info/history view with a shared study card; improved join/quit/rejoin tracking and sync
- Fixed a crash when enabling or updating the accessibility service
- Security: stopped exposing the API key in the UI and source

4.7.2.beta
- Fix ESM settings parsing crashes and improve error handling

4.7.1.beta
- New feature: Allow participants to add notes and save them to the remote database

4.6.2.beta
- Adjust function to count installation, change the official website url used for receive device info

4.6.1.beta
- New feature to new plugin: Ambient Noise and OpenWeather
- Rename "AWARE-Light" to "AWARE"

Change log for AWARE-Light
4.6.1.beta
- New feature: Allow users to take notes if config file container correspond setting.

4.5.5.beta
- Add function to count installation and send info to official website

4.5.4.beta
- Fix logic of reschedule next day random esm trigger, avoid repeat appear of esm notification

4.5.3.beta
- Fix the ESM queue logic to ensure that the correct number of questions are displayed according to the configurator settings.

4.5.2.beta
- Screenshot sensor can capture application name for foreground app.

4.5.1.beta
- New feature: Allow users to filter and save screenshots based on specific package names. Support for inclusive or exclusive.

4.4.1.beta
- New feature to synchronize the screenshot image data to the remote database specified by the aware-light configurator through base64 encoding.

4.3.1.beta
- New feature to capture screenshots at regular intervals and save them to the device's storage.

4.2.2.beta
- Fix display issues: long question titles can be displayed completely.

4.2.1.beta
- New feature to export the aware-light database files to the device's storage.

4.1.6.beta
- Fixed a crash that occurred when enabling accessibility before starting a study.
Change log for AWARE-Light
4.1.6.light.bundle
- A crash that occurred when enabling accessibility before starting a study has been fixed.
- The screen text sensor now correctly collects duplicate text when the foreground app changes, ensuring that screen text is captured during app switches, home screen access, and notification checks.
- Fix display issues: long question titles can be displayed completely.
- Fix the ESM queue logic to ensure that the correct number of questions are displayed according to the configurator settings.
- Fix logic of reschedule next day random esm trigger, avoid repeat appear of esm notification.
- A stronger password detection added in ScreenText Sensor

4.1.5.beta
4.1.5.light.bundle
- Logging if the application is terminated by user actions or system actions to aware_log table

4.1.4.beta
- Screen reader function improved performance

4.1.4.light.bundle
- same as 4.1.3.light.bundle

4.1.3.light.bundle
- Fixed bug for random EMA triggered condition
- Screen reader function improved performance
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ in naturalistic and laboratory settings. The platform can be integrated with MyS

You can get the source code of all the components that make the AWARE client from GitHub.
```bash
$ git clone https://github.com/awareframework/aware-light-client.git
$ cd aware-light-client
$ git clone https://github.com/awareframework/aware-client.git
$ cd aware-client
$ touch .gitmodules
$ git submodule update --init
```
Expand Down
11 changes: 5 additions & 6 deletions aware-core/aware.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
//shared with all modules
buildscript {
ext {
// ion_libs, google_libs and aware_libs removed: unused (see build.gradle at repo root for
// the same cleanup). Note this file is currently not reached by any included module in
// settings.gradle — see the plugin build.gradle fix note below.
mqtt_libs = '1.2.1'
ion_libs = "2.+"
google_libs = "17.0.0"
version_code = (System.getenv("VERSION_CODE") ?: "3").toInteger()
version_readable = System.getenv("VERSION_NAME") ?: ("4.7." + version_code + ".beta")
version_code = (System.getenv("VERSION_CODE") ?: "1").toInteger()
version_readable = System.getenv("VERSION_NAME") ?: ("4.8." + version_code + ".beta")
compile_sdk = 28
target_sdk = 28
minimum_sdk = 24
build_tools = "28.0.3"
aware_libs = "master-SNAPSHOT"
kotlin_version = "1.3.41"
build_gradle = "3.4.2"
// anko_version = "0.10.8"
}

repositories {
Expand Down
14 changes: 12 additions & 2 deletions aware-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,17 @@ dependencies {
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0-alpha'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "com.squareup.okhttp3:okhttp:4.2.2"
implementation files('libs/mysql-connector-java-5.1.48.jar')
implementation files('libs/jsonassert-1.5.0.jar')
// Was vendored as libs/mysql-connector-java-5.1.48.jar (a binary committed to git with no
// update path). Same version, sourced from Maven Central instead so it's a normal tracked
// dependency. The 5.1.x line itself is EOL — moving to the current com.mysql:mysql-connector-j
// 8.x is a separate, larger change (driver class name and connection URL params changed
// between the lines) and needs a real device/DB test pass before swapping, tracked as its own
// follow-up rather than bundled into this dependency-hygiene fix.
implementation "mysql:mysql-connector-java:5.1.49"
// Was vendored as libs/jsonassert-1.5.0.jar — identical version, now from Maven Central.
// Group is org.skyscreamer there, not com.github.skyscreamer (that's a JitPack-style coordinate).
implementation "org.skyscreamer:jsonassert:1.5.0"

testImplementation 'junit:junit:4.13.2'
}

3 changes: 2 additions & 1 deletion aware-core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /><!-- needed for Android 28 P -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

<!-- Support for Sync Adapters -->
<uses-permission android:name="android.permission.READ_SYNC_STATS" />
Expand Down Expand Up @@ -788,4 +789,4 @@

</application>

</manifest>
</manifest>
11 changes: 6 additions & 5 deletions aware-core/src/main/java/com/aware/Accelerometer.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.aware.providers.Accelerometer_Provider.Accelerometer_Data;
import com.aware.providers.Accelerometer_Provider.Accelerometer_Sensor;
import com.aware.utils.Aware_Sensor;
import com.aware.utils.SensorTimeUnits;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -273,15 +274,15 @@ public int onStartCommand(Intent intent, int flags, int startId) {
saveAccelerometerDevice(mAccelerometer);

if (Aware.getSetting(this, Aware_Preferences.FREQUENCY_ACCELEROMETER).length() == 0) {
Aware.setSetting(this, Aware_Preferences.FREQUENCY_ACCELEROMETER, 200000);
Aware.setSetting(this, Aware_Preferences.FREQUENCY_ACCELEROMETER, 20000);
}

if (Aware.getSetting(this, Aware_Preferences.THRESHOLD_ACCELEROMETER).length() == 0) {
Aware.setSetting(this, Aware_Preferences.THRESHOLD_ACCELEROMETER, 0.0);
}

int new_frequency = Integer.parseInt(Aware.getSetting(getApplicationContext(), Aware_Preferences.FREQUENCY_ACCELEROMETER));
double new_threshold = Double.parseDouble(Aware.getSetting(getApplicationContext(), Aware_Preferences.THRESHOLD_ACCELEROMETER));
int new_frequency = Aware.getSettingAsInt(getApplicationContext(), Aware_Preferences.FREQUENCY_ACCELEROMETER, 20000);
double new_threshold = Aware.getSettingAsDouble(getApplicationContext(), Aware_Preferences.THRESHOLD_ACCELEROMETER, 0.0);
boolean new_enforce_frequency = (Aware.getSetting(getApplicationContext(), Aware_Preferences.FREQUENCY_ACCELEROMETER_ENFORCE).equals("true")
|| Aware.getSetting(getApplicationContext(), Aware_Preferences.ENFORCE_FREQUENCY_ALL).equals("true"));

Expand All @@ -297,15 +298,15 @@ public int onStartCommand(Intent intent, int flags, int startId) {
ENFORCE_FREQUENCY = new_enforce_frequency;
}

mSensorManager.registerListener(this, mAccelerometer, Integer.parseInt(Aware.getSetting(getApplicationContext(), Aware_Preferences.FREQUENCY_ACCELEROMETER)), sensorHandler);
mSensorManager.registerListener(this, mAccelerometer, SensorTimeUnits.samplingPeriodUs(new_frequency), sensorHandler);
LAST_SAVE = System.currentTimeMillis();

if (Aware.DEBUG) Log.d(TAG, "Accelerometer service active: " + FREQUENCY + " ms");

if (Aware.isStudy(this)) {
ContentResolver.setIsSyncable(Aware.getAWAREAccount(this), Accelerometer_Provider.getAuthority(this), 1);
ContentResolver.setSyncAutomatically(Aware.getAWAREAccount(this), Accelerometer_Provider.getAuthority(this), true);
long frequency = Long.parseLong(Aware.getSetting(this, Aware_Preferences.FREQUENCY_WEBSERVICE)) * 60;
long frequency = Aware.getSettingAsLong(this, Aware_Preferences.FREQUENCY_WEBSERVICE, 30) * 60;
SyncRequest request = new SyncRequest.Builder()
.syncPeriodic(frequency, frequency/3)
.setSyncAdapter(Aware.getAWAREAccount(this), Accelerometer_Provider.getAuthority(this))
Expand Down
Loading