Skip to content
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

Merged
merged 168 commits into from
Nov 11, 2021
Merged

Conversation

barbeau
Copy link
Owner

@barbeau barbeau commented Sep 27, 2021

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:

Closes #299
Closes #492

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)
@barbeau barbeau added this to the v4.0 milestone Nov 5, 2021
@barbeau 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 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
@barbeau barbeau marked this pull request as ready for review November 10, 2021 23:27
@barbeau barbeau merged commit 23b482d into master Nov 11, 2021
@barbeau barbeau deleted the service branch November 11, 2021 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove legacy GpsStatus listener Run GPSTest as foreground Service when in background
1 participant