0

There are two apps using Exoplayer. AppA and AppB

  • AppA starts streaming audio.
  • AppB is then launched which initialises the exoplayer instance. NOTE: No stream is yet played on AppB.
  • But right away AppA stops playing the audio.

Could someone help understand this behaviour with the new initialisation of the exoplayer?

Thanks.

Sunny
  • 7,444
  • 22
  • 63
  • 104

2 Answers2

0

Probably ExoPlayer gets garbage collected. You should use foreground service, to make sure a service stays alive as much as possible without being killed by the system.

Sever
  • 2,338
  • 5
  • 35
  • 55
0

The issue was that we were requesting for audio focus after initialisation instead of when the user requested a play event. Basic mistake I suppose.

No issue in terms of the ExoPlayer.

Sunny
  • 7,444
  • 22
  • 63
  • 104