florent37 / Flutter-AssetsAudioPlayer

Play simultaneously music/audio from assets/network/file directly from Flutter, compatible with android / ios / web / macos, displays notifications
https://pub.dartlang.org/packages/assets_audio_player
Apache License 2.0
752 stars 357 forks source link

On android the notification buttons don't appear on Android 13 #774

Closed akarapetsas closed 1 year ago

akarapetsas commented 1 year ago

Hi there,

I found out a bug on android 13. The notification action buttons, like play/pause, stop etc. don't appear in the notification bar on android. The following snippet

Flutter Version

My version : 3.7.12

Lib Version

My version : assets_audio_player: ^3.0.6

Platform (Android / iOS / web) + version

Platform : Android

Describe the bug

On android the notification buttons play, pause, stop don't appear

Small code to reproduce

await assetsAudioPlayer.open(
          updatedModel.audio,
          showNotification: true,
          headPhoneStrategy: HeadPhoneStrategy.pauseOnUnplug,
          notificationSettings: NotificationSettings(playPauseEnabled:true, seekBarEnabled: true),
        );

Running the code above only the seekBar is enabled but not the play/pause buttons on android 13

akarapetsas commented 1 year ago

@kalismeras61 could you please support here?

Jens-source commented 1 year ago

I noticed the same. Wonder if this is some Android update that clashes with this package as it hasn't been updated for 5 months.

mccurrye commented 1 year ago

I'm also having this issue on Android 13. I have a radio app that also plays programs on-demand. The radio player uses Audio.liveStream and it shows the play/pause button. However the on-demand programs use Audio.network and when playing, the play/pause button does not display. I've also noticed that the liveSteam does not display anything in lock screen, only notifications, but the audio.network shows in both without play/pause controls. (not sure if that needs be submitted as a separate issue).

hunterwilhelm commented 1 year ago

This bug is forcing me to switch to a different package. I loved this one! But this bug is a deal breaker for me at the moment.

Jens-source commented 1 year ago

Hi Wilhelm. I also got stuck with that and justaudio with the notification package has all the control you need. A great addition is that it caches audio so there aren’t any delays

On Wed, Aug 2, 2023 at 4:01 AM Hunter Wilhelm @.***> wrote:

This bug is forcing me to switch to a different package. I loved this one! But this bug is a deal breaker for me at the moment.

— Reply to this email directly, view it on GitHub https://github.com/florent37/Flutter-AssetsAudioPlayer/issues/774#issuecomment-1661087353, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM4XBWC6SSZH676KV42GDPTXTFVCJANCNFSM6AAAAAAYDIIPK4 . You are receiving this because you commented.Message ID: @.***>

kalismeras61 commented 1 year ago

please use latest version it is fixed.