4

I am using Explayer PlayerNotificationManger to show playback notifications for live-stream video played using Exoplayer2.

I have followed this medium blog and implemented the same.

However, when the code runs on the device, it shows a notification every 3-4 second for a live-stream video. Please suggest something that I may not get multiple and frequent notifications when one notification is already visible to user.

Wirling
  • 4,810
  • 3
  • 48
  • 78
Aman Singh
  • 41
  • 3
  • I believe that I am facing the same problem. I have also followed the mentioned article, and the notification with playback controls does appear, however, it also makes annoying notification sound multiple times when notification is initialized or when video is paused / resumed. Does anyone have a solution for this? – Firzen Feb 15 '21 at 15:42

1 Answers1

1

If your notification, or notification channel is marked as high importance, every time the state is updated it will result in the notification alerting the user.

See this comment from an ExoPlayer contributor on GitHub.

Stuart Gilbert
  • 176
  • 1
  • 4
  • Worked for me (replacing high with low). I did set high importance because I wanted to show the notification on top of others (as music apps do), but we can achieve the same setting a session token. – JCarlosR Jan 17 '22 at 15:55