Skip to content

#369: Implemented App Usage observation#383

Merged
janoliver20 merged 12 commits into
developfrom
369-app-usage-observation
May 7, 2026
Merged

#369: Implemented App Usage observation#383
janoliver20 merged 12 commits into
developfrom
369-app-usage-observation

Conversation

@janoliver20
Copy link
Copy Markdown
Collaborator

Other changes:

  • Better observation initalization process for less memory usage
  • Added a long running observation storage possibility, so data are not sent right away

Other changes:
- Better observation initalization process for less memory usage
- Added a long running observation storage possibility, so data are not sent right away
@janoliver20 janoliver20 requested a review from iaigner March 18, 2026 08:51
@janoliver20 janoliver20 self-assigned this Mar 18, 2026
@janoliver20 janoliver20 marked this pull request as ready for review March 18, 2026 08:51
Copy link
Copy Markdown
Contributor

@iaigner iaigner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just some really minor things and a question - but code LGTM -> and your pipeline does need to be fixed

one open question: is it possible to take the tracking approvement away for one observation or is it similar to how we do with the study consent? can they take the approvement away through the app?

i still need to test the application on my phone

navController: NavController
viewModel: ObservationDetailsViewModel
) {
val backStackEntry = remember { navController.currentBackStackEntry }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or is that backStackEntry in the new Wrapper included?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was necessary before the wrapper. This is now handled by the wrapper

@janoliver20
Copy link
Copy Markdown
Collaborator Author

Tracking consent needs to be able to be declined at any moment, as per Apples rules. But this is the same as any other observation, we cannot do anything if the user decides to remove any sensor permissions for our app, we can only show a warning, but we cannot deny the usage

# Conflicts:
#	shared/src/commonMain/moko-resources/base/strings.xml
#	shared/src/commonMain/moko-resources/de/strings.xml
@iaigner
Copy link
Copy Markdown
Contributor

iaigner commented Apr 27, 2026

.gradlw build didn't work when i checked the branch out for testing purporses

@iaigner
Copy link
Copy Markdown
Contributor

iaigner commented Apr 27, 2026

So i tested the 369 on my android phone. I found following:

  • Garmin Connect gives an error that they can't show the login. My VPN was off (because that was the former problem that triggered a similar problem when it's on (see screenshots below)
  • you can activate the observation even though garmin is not connected and there is no info that it's not (second thing i think was always like that)
  • QR Code Scanner crashes if you want to open it twice in one session (but that's a known bug)
  • If you get a simple push notification from an intervention and click on the element with the unread point, it opens the notification screen again visualy
  • the output for the app usage is an [object Object]. I think we'd need something more readable here
  • (One FE Bug: Simple and Multiple Questions -> you can't write into the Input fields anymore)

Screenshots:

App:

WhatsApp Image 2026-04-27 at 15 38 19 (1) WhatsApp Image 2026-04-27 at 15 38 19 WhatsApp Image 2026-04-27 at 15 38 20

Output:

Bildschirmfoto 2026-04-27 um 15 47 22

# Conflicts:
#	androidApp/src/main/java/io/redlink/more/app/android/activities/dashboard/filter/DashboardFilterView.kt
#	androidApp/src/main/java/io/redlink/more/app/android/activities/notification/filter/NotificationFilterView.kt
@janoliver20
Copy link
Copy Markdown
Collaborator Author

So i tested the 369 on my android phone. I found following:

  • Garmin Connect gives an error that they can't show the login. My VPN was off (because that was the former problem that triggered a similar problem when it's on (see screenshots below)
  • you can activate the observation even though garmin is not connected and there is no info that it's not (second thing i think was always like that)
  • QR Code Scanner crashes if you want to open it twice in one session (but that's a known bug)
  • If you get a simple push notification from an intervention and click on the element with the unread point, it opens the notification screen again visualy
  • the output for the app usage is an [object Object]. I think we'd need something more readable here
  • (One FE Bug: Simple and Multiple Questions -> you can't write into the Input fields anymore)
  • Garmin cannot work, as there is no Garmin Connect connected in More, so that works as expected.
  • QR Code scanner is an old bug and not worth fixing for now
  • The output in the FE is as expected, as it only lists simple types and not objects

- GPS recording on iOS and Android
- Permission request now fully works
- Notification deeplinks no longer infinitley route to the notificationview when a notification is clicked without deeplink
- Translation Strings added
- Cleanup
@iaigner
Copy link
Copy Markdown
Contributor

iaigner commented May 6, 2026

test results on android:

  • app was open and i change the study status to paused and then to active -> it didn't got the active state but with the "neu laden" button it worked
  • i removed the garmin observations in the paused study and my app did show the error screen for garmin nontheless (but only once, maybe it just needed time to adjust)
  • ACC was not tracked -> i had it on not hidden before pausing, where i didn't start it, but when i changed it to hidden and restarted the app, it still didn't collect data
  • GPS test with timestamp stop -> i set it on 15:50 but it kept collecting data
  • GPS permission removed -> i removed the permission in the phone settings and it stopped (though the app shows it as running still)

@janoliver20

@iaigner iaigner self-requested a review May 6, 2026 14:35
- Permission request improvements
Copy link
Copy Markdown
Contributor

@iaigner iaigner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - when you have fixed the problem with the id for the app usage, you are good to go

- Fixed an view foreground/background issue
@janoliver20 janoliver20 deployed to PlayStore May 7, 2026 12:06 — with GitHub Actions Active
@janoliver20 janoliver20 merged commit d8edac6 into develop May 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants