-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Android 13+] Missing notification player actions #9764
Comments
Likely related to this change when targeting Android 13: https://developer.android.com/about/versions/13/behavior-changes-13#playback-controls I wonder why nobody found this change in the release candidate, as it is pretty easy to see. |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as spam.
This comment was marked as spam.
I don't think, this is exclusive to Android 13. My Tecno Spark Go running on Android 12 face the same bug |
Sometimes OEMs implement specific features from newer Android versions. Look at a few images of the A12 media notification and compare yours to them. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as duplicate.
This comment was marked as duplicate.
As a temporary workaround, targetSdk can be set back to 32 until transition to PlaybackSession is complete |
Now, as mentioned above by @AudricV, it's broken for all UIs that follow Google's A13 reference, so if support something, this is the most reasonable thing to support |
I am also facing this problem on my pixel 6 with graphene os (custom rom). I remember it worked fine untill I updated newpipe. I think I updated to 0.23 (long time ago) and till this day I still don't have the additional actions in the notification. |
I can probably help. Can you link in Code, where the custom actions are set up? |
Player notifications are created currently in a custom way in the Also, keep in mind #9764 (comment). This mean the UI of the player notification settings needs to be adapted. |
@PaulWoitaschek Do you want this to be assigned to you? |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as duplicate.
This comment was marked as duplicate.
Would the fix here be adding PlaybackState.CustomAction's to the list returned by PlaybackState.getCustomActions() ? Maybe also removing ACTION_SKIP_TO_PREVIOUS and ACTION_SKIP_TO_NEXT from the supported actions list to force it to use the custom actions for actions "2" and "3" too? Sorry, I'm not familiar with these APIs at all. Alternatively,
Would it be acceptable to not set the PlaybackState at all, in which case (If I'm reading these docs right) it will fall back to the same old behaviour? I might mess around with this a bit if I can get it to compile and a dev env set up. |
Got it to compile, realized the session playbackState is managed by exoplayer. I think setting custom actions on it then needs to be done on the MediaSession with MediaSessionConnector.CustomActionProvider and implementing MediaSessionConnector.CustomActionProvider |
Just realized exoplayer is apparently deprecated?
|
I have a patch here nico-abram@7074d8a If the general approach seems good enough I could clean it up and send a pull request |
@nico-abram thank for your attempt, hope it will get merged. In addition A13 notifications seem to eliminate the whole at most three controls stuff, and the corresponding settings can be removed for A13+ to avoid confusion |
Sent a PR #10567 |
Could you all test whether #10580 works for you? It is based on the work by nico-abram, so many thanks to him! |
@Stypox Can we get a built APK somehow or so for eas(ier) testing? |
@rugk The PR description tells you exactly how to download it. |
@Stypox, works well for me on LineageOS 20 (A13) |
Also changes behavior of A13+ player notification buttons. Fixes TeamNewPipe#7880 and improves TeamNewPipe#9764
Checklist
Affected version
0.25.0
Steps to reproduce the bug
Play any song,
Swipe down to see the notification player
Swipe the notification player, or just tap on it
Expected behavior
Next/previous track buttons, pause/play, repeat, close buttons are visible.
Actual behavior
Only next/previous track and play/pause buttons are visible. Changing it in preferences does nothing. Not mentioning that I have enough space to have all five of them.
Screenshots/Screen recordings
Logs
No response
Affected Android/Custom ROM version
Android 13
Affected device model
Galaxy M12
Additional information
No response
The text was updated successfully, but these errors were encountered: