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.
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
Add a homescreen widget #144
base: master
Are you sure you want to change the base?
Add a homescreen widget #144
Changes from 5 commits
9f2ef97
a3dc1c0
f2c2da5
d4cc23d
ac09a01
16cdcf2
bc0fbac
df36780
f6461bd
afd7dfe
c80429d
0c43ef6
f5d4d07
e2efeda
38efc38
7a1dee0
4613e44
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm looking into the ANR, but we definitely need to use
getForegroundService
, because otherwise the intent will be ignored on newer Android versions.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we might be able to work around this issue by using the broadcast receiver that listens to media playback button presses and that starts the service for us.
During my testing this worked very well, except for one time where we failed to create a notification with an
ForegroundServiceStartNotAllowedException
. This was after killing the app and I think it was caused by an extremely slow startup, which might have caused us to exceed some timeframe. But I have not been able to replicate that, it worked every other attempt.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious, how did you generate this preview? Can we document this process somehow somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, we need to update the preview image after you added padding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Android emulators with an API <= 26 have a
Widget Preview
app that can generate the preview. I added a a comment in the preview XML layout with a reminder and instructions on how to update it.