It was not a radio application but it differs only by one. The file is not on the device. Exoplayer is the best for playback, also for files from the Internet.
Therefore, this problem also applies to radio applications.
I tested your apk on physical smartphone with android 6 and on AVD with android 9. With the WAV files the application was not closed and the audios continued without problem. As you say, the problem is with ogg audios.
I have now tried an ogg file and another wav, I have left them playing at the same time. It has endured without closing. It may also work on your devices that when the screen is in sleep mode stops sounding … You can try. ExoTest.apk (7.9 MB)
I had already tried this (by placing a 1 sec silent WAV file to ExoPlayer3.Source, ExoPlayer3.Volume = 0, ExoPlayer3.Loop = true), but unfortunately that doesn’t change the fact that the sound (OGG file) starts to stutter after 50 -60 seconds after the device goes into sleep mode.
I really hope @Kodularupdates the ExoPlayer to this current version soon, because the ExoPlayer version 2.8.2 is completely unusable due to the issues in background / standby (sleep mode).
As long as this has not happened, I must continue to use the TaifunPlayer (for gapless looping) and otherwise the Player component.
Are you planning to use the new AndroidX library? Or is there any other solution for the ExoPlayer? It would be a shame if it could no longer be used. Because it is currently completely unusable.
@Kodular it might be a good idea to add the version into the documentation for the exo player component as well as for other components, which use other libraries…
This problem is related to the doze mode of Android 6 and later
Please do and test what you said in this video carefully
لطفا کارهایی که توی این ویدیو گفته رو با دقت انجام بدید وتست کنید