-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add background execution, convert Status to Composable #550
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
So there is no sound
We don't need the init() subscribe call - if the activity is re-created when the service is already running it will re-bind
# Conflicts: # build.gradle # gradle/wrapper/gradle-wrapper.properties
We now have screens faster than 60Hz, so let's update as quickly as possible
Still need to finish file logging init in Service (still references savedInstanceState)
It's not thread-safe and isn't really needed here Also some refactoring cleanup
This was referenced Nov 4, 2021
...and out of the ViewModel.
* TODO - Move status.toSatelliteGroup() to it's own Flow?
Having a separately SatelliteGroup flow complicates things, as it's not a clear-cut use in SignalInfoViewModel because of filtering and partitioning of data. Let's wait until implementation of Dashboard to see if this makes more sense then (in conjunction with the service using SatelliteGroup).
barbeau
changed the title
feat: Add support for background execution via foreground service
feat: Add background execution via foreground service, convert Status to Composable
Nov 10, 2021
barbeau
changed the title
feat: Add background execution via foreground service, convert Status to Composable
feat: Add background execution, convert Status to Composable
Nov 10, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 is a major overhaul of the app internals to support a foreground service (i.e., a notification that shows current GNSS status even when the main Activity UI is not showing).
This involves moving all the API listeners for GNSS events into their own "manager" classes based on Kotlin
callbackFlow
that exist the entire lifecycle of the app, so the various app components (Fragments, ViewModels, Activity, Service) can all receive updates from this single source.This bumps minSdkVersion to Android N (24) so we we don't need to deal with the legacy GPS* APIs anymore, which greatly simplifies the data processing within the app.
TODO:
callbackFlow
as detailed in https://barbeau.medium.com/kotlin-callbackflow-a-lightweight-architecture-for-location-aware-android-apps-f97b5e66aaa2.Closes #299
Closes #492