-
Notifications
You must be signed in to change notification settings - Fork 226
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 Media Notification Controls for Android 13 #540
Conversation
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.
This is working really well! Thank you so much for the effort. 🙇♀️ I just left a few code-style comments.
Let me also ping @adamzelinski to provide any design feedback.
Meanwhile, can you add a few testing instructions in the PR description?
Also, let's add a CHANGELOG entry, something like:
Allowed customization of actions through Settings in Mediastyle Notification
...es/model/src/main/java/au/com/shiftyjelly/pocketcasts/models/to/MediaNotificationControls.kt
Outdated
Show resolved
Hide resolved
...es/model/src/main/java/au/com/shiftyjelly/pocketcasts/models/to/MediaNotificationControls.kt
Outdated
Show resolved
Hide resolved
...ervices/preferences/src/main/java/au/com/shiftyjelly/pocketcasts/preferences/SettingsImpl.kt
Outdated
Show resolved
Hide resolved
...es/model/src/main/java/au/com/shiftyjelly/pocketcasts/models/to/MediaNotificationControls.kt
Outdated
Show resolved
Hide resolved
8344921
to
ce30d91
Compare
Hey @ashiagr, I have made the required changes and I messed up while squashing the commits by rebasing again, So had to cherry pick my changes and then force push to this branch only( didn't made new PR), this will not be a problem. right? |
No worries, 😀 I deleted my local branch and re-fetched yours. All updates look good, nice job! I found a typo though. I was also wondering if we should hide the setting if the device OS version is less than 13. Wdyt? |
yes, I think we should hide the setting for version less than 13. |
ce30d91
to
1c433fb
Compare
Hey @ashiagr, made the required changes, please review it. |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { | ||
MediaNotificationControls( | ||
saved = settings.defaultMediaNotificationControlsFlow.collectAsState().value, | ||
onSave = { | ||
settings.setDefaultMediaNotificationControls(it) | ||
} | ||
) | ||
} |
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 good!
I'm merging this PR, but feel free to drop a comment if you have any design feedback. Thanks once again @ksog66, for this contribution. 🙏 |
@ashiagr Sorry for the late response on this - I was AFK. These additions look really nice though. Thanks so much! |
Description
Adding Media Notification Control setting under Defaults of General setting page, which gives Android 13 users option to have at max 2 option from Archive, Mark as played, Play next, Playback speed and Star option in notification media session.
Testing Instructions
Screenshots or Screencast
clip4.webm
clip1.webm
clip2.webm
clip3.webm
Checklist
modules/services/localization/src/main/res/values/strings.xml
I have tested any UI changes...