fix foreground service start for Android O+#2571
Open
lydiym wants to merge 1 commit intokivy:developfrom
Open
Conversation
Contributor
|
Interestingly, other bootstraps have this code already: https://github.com/kivy/python-for-android/blob/develop/pythonforandroid/bootstraps/service_library/build/templates/Service.tmpl.java#L41 Is there a reason why the common template has been kept different? My suspicion is this is only an issue if you specify I found that another (more robust) way to achieve autorestart functionality is to simply add |
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.
Problem
Foreground Service doesn't work correctly on android O+. Here is trace:
Not allowed to start service Intent- it's about background service limitations: https://developer.android.com/about/versions/oreo/background, But I use
:foregroundinbuildozer.spec:Problem happens after app closing
There is related issue #1785
Fix
The fix repeats part of closed pull request https://github.com/kivy/python-for-android/pull/1786/files#diff-91249b27761ee10b96c07b64959a33951619a2547223ebeaaf82ece873e1e594R104