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

Bugfix for widget PendingIntents on Android Oreo and higher #957

Merged
merged 1 commit into from
Feb 8, 2020

Conversation

KBerstene
Copy link
Contributor

When attempting to play music from the home screen widgets on Android 8 and higher, if the DownloadService has been stopped by the OS due to its idle state, the service fails to start and this message is logged:

W/ActivityManager: Background start not allowed: service Intent { act=github.daneren2005.dsub.CMD_TOGGLEPAUSE flg=0x10000000 cmp=github.daneren2005.dsub/.service.DownloadService bnds=[697,1868][1059,2010] } to github.daneren2005.dsub/.service.DownloadService from pid=-1 uid=10316 pkg=github.daneren2005.dsub startFg?=false

Instead, the service needs to be started as a foreground service. I have created that fix in this PR.

Interestingly, the notifications didn't need to be fixed because notifications are exempted from this limitation. Note the whitelisted intents here: https://developer.android.com/about/versions/oreo/background

This is related to #880.

nvllsvm added a commit to nvllsvm/Audinaut that referenced this pull request Aug 25, 2019
@daneren2005 daneren2005 merged commit c7ec80b into daneren2005:edge Feb 8, 2020
t-m-w pushed a commit to t-m-w/Subsonic that referenced this pull request Jul 15, 2020
…tents

Bugfix for widget PendingIntents on Android Oreo and higher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants