Improve FetchPushForegroundService's reliability#6757
Open
jmartinesp wants to merge 1 commit intodevelopfrom
Open
Improve FetchPushForegroundService's reliability#6757jmartinesp wants to merge 1 commit intodevelopfrom
FetchPushForegroundService's reliability#6757jmartinesp wants to merge 1 commit intodevelopfrom
Conversation
- Don't use DI, we can just create the notification channel. This should speed up the creation of the service and reduce the number of `ForegroundServiceDidNotStartInTimeException` received. Also use `MainScope` instead of the app's coroutine scope. - Move the wakelock releasing mechanism to `onDestroy` so it's always used. Previously, this would only happen when `stopService` was called, which would only happen when `stopSelf()` is called, but not when the OS or the service manager stops the service.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6757 +/- ##
===========================================
- Coverage 81.22% 81.21% -0.01%
===========================================
Files 2633 2633
Lines 73426 73433 +7
Branches 9490 9491 +1
===========================================
Hits 59638 59638
- Misses 10300 10307 +7
Partials 3488 3488 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
This file contains hidden or 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
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.



Content
ForegroundServiceDidNotStartInTimeExceptionreceived. Also useMainScopeinstead of the app's coroutine scope.onDestroyso it's always used. Previously, this would only happen whenstopServicewas called, which would only happen whenstopSelf()is called, but not when the OS or the service manager stops the service.Motivation and context
Fix the
ForegroundServiceDidNotStartInTimeExceptionwe're still seeing in Sentry.Tests
Just use notifications as usual.
Tested devices
Checklist