This repository has been archived by the owner on Feb 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… from Kotlin objects)
The background process sync manager was set up this way to allow testing using this manager in a simplified app. The use of `BGTaskScheduler` is a bit brittle - as of this writing, a background process that runs when the app is backgrounded will stall on tasks that are running on the `MainActor` so only ``onLaunch(backgroundProcessId:)`` is ever called from that thread.
syoung-smallwisdom
requested review from
Erin-Mounts,
DwayneJengSage,
jnelsonjava and
nategbrown9
September 6, 2023 00:23
syoung-smallwisdom
force-pushed
the
syoung/refactor-upload-3
branch
from
September 7, 2023 02:30
88cda4f
to
a10d7b9
Compare
Erin-Mounts
approved these changes
Sep 7, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good--thanks for the detailed walk-through
nategbrown9
approved these changes
Sep 7, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This has been tested on a single device with WiFi toggling.
It uses BridgeClient (cross platform Kotlin binary) to track pending uploads and to launch uploading the adherence records, uploads, and upload complete messages. It uses URLBackgroundSession to handle the S3 upload. Finally, it relies upon using BGTaskScheduler to schedule a background process (to run when the phone is sleeping and connected to wifi) to handle launching adherence record and archive uploading if there isn't a Wifi connection.