-
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
Remove legacy GpsStatus listener #492
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Looks like this is a bug in Android 11 that's triggered when the user unchecks the GPSTest "Use GNSS APIs" setting within the app, which then triggers the legacy onGpsStatusChanged() API. That setting was introduced during the transition between Android 6 and 7 and can be removed now. Less than 3% of users are on devices less than Android 7, so going forward with the architectural changes required for #313 and #299 I may look at removing these listeners entirely and supporting only Android 7 and up going forward. |
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. * Convert Activity and Fragments to Kotlin * Add service with notification * Remove legacy GPS* APIs (pre-Android N) * Convert all location / GNSS API registrations to data managers based on Kotlin callbackFlow as detailed in https://barbeau.medium.com/kotlin-callbackflow-a-lightweight-architecture-for-location-aware-android-apps-f97b5e66aaa2. * NMEA * Location * GNSS measurement * Antenna * Nav message * Sensor (orientation) * Add view binding to fragments * Fix filter bug - it currently shows # signals being filtered, not number satellites (doesn't match # Sats field) * Move aggregation of signals to satellites into Flow/ViewModel. * Change Status to Composable - Use LiveData in ViewModel instead - see https://bladecoder.medium.com/kotlins-flow-in-viewmodels-it-s-complicated-556b472e281a that says don't use Flows in ViewModels. Closes #299 Closes #492
Describe the bug
Reported 23 times in the Google Play Developer Console over the last 30 days:
To Reproduce
Unknown
Expected behavior
Don't crash
Observed behavior
Crash
App, Device and Android version:
All crashes are with GPSTest version
18076
(v3.8.4) and all on Android 11. Devices are Samsung Galaxy M31, Xiaomi Mi 10T, Xiaomi Mi Note 10 Lite, Samsung Galaxy Z Flip 5GThe text was updated successfully, but these errors were encountered: