-
-
Notifications
You must be signed in to change notification settings - Fork 483
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
there has play/pause control in notification not match the empty controls setting or not set controls #1099
Comments
https://developer.android.com/about/versions/13/behavior-changes-13?hl=zh-cn#playback-controls |
Can you submit a bug report in English following the instructions? |
sorry, I have modified the description。 maybe is not issue,but i have no idea for that。 |
If you want to ask a question about how set the icons on Android, please follow the instructions on the New Issue page which direct you to StackOverflow (the question asking/answering site). If you find the answer, hopefully it works for you. If you discover that you need me to expose more of the Android API in this plugin, you can come back here and submit a feature request detailing exactly what parts of the API are missing. |
this is a problem when i clear controls setting or not set controls PlaybackState( there is a default pause and play icon in notification this is because com/ryanheise/audioservice/AudioService.java line 75 AUTO_ENABLED_ACTIONS |
Documented behaviour
Actual behaviour
Question: How to replace the default play/pause icon in notification
Phenomenon:
Modify the button control in the notification in the controls parameter of PlaybackState, clear the list, and there will be a default play/pause icon switching function on the UI;
Add
MediaControl.play
with the same name but replace the iconMediaControl.play.copyWith(androidIcon: "drawable/baseline_forward_30_24")
that displays the default icon;Adding a picture with the same name as the default icon to the drawable cannot replace the default play and pause icons. But stop can be replaced.
The image is not modified:
MediaControl.pause.copyWith(androidIcon: "drawable/audio_service_stop")
,Image modification:
MediaControl.stop
,Image modification:
MediaControl.rewind.copyWith(androidIcon: "drawable/audio_service_stop")
,Add a custom type of controls, and the icon can take effect normally.
In the example you provided, you can reproduce this problem by directly modifying the content in controls. No other modifications are required.
Minimal reproduction project
Official example: example_android13.dart
Reproduction steps
Modify the control parameter content in the _transformEvent method and add the corresponding test image to the drawable.
Output of flutter doctor
It has nothing to do with flutter
Devices exhibiting the bug
android 14 ,Huawei Honor pro9
The text was updated successfully, but these errors were encountered: