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
757 stars 368 forks source link

Missing Now Playing Card on Android TV #806

Closed Sekru closed 1 year ago

Sekru commented 1 year ago

Flutter Version

3.10.5

Lib Version

3.1.1

Platform (Android / iOS / web) + version

Android TV

Describe the bug

I'm trying to develop small radio app. Sometings is missing or wrong because there is no Now Playing Card on Android TV when someone press Home button. When I'm trying to publish my app, also I'm getting error from Google about missing Now Playing Card. I'm not sure if this feature is implemented or something is wrong with my code. My code is very simple. Did I miss something?

Small code to reproduce

await PlayerService.instance.assetsAudioPlayer.open(
      notificationSettings: NotificationSettings(
          playPauseEnabled: true,
          nextEnabled: false,
          prevEnabled: false,
          stopEnabled: true,
          seekBarEnabled: false,
          customStopAction: (p) {
            // custom action
          }),
      Audio.liveStream(stream,
          metas: Metas(
              artist: station?.image!.title,
              title: station?.title,
              image: station?.image?.src != null ? MetasImage.network(station!.image!.src!) : const MetasImage.asset('images/deafult_avatar.png'))),
      showNotification: true,
      playInBackground: PlayInBackground.enabled,
      volume: PlayerService.instance.assetsAudioPlayer.volume.value,
    );
Sekru commented 1 year ago

After I removed property notificationSettings it starts showing