I’ve tried it on AVD Pixel 3 Android 9 and on Physical Smartphone with Android 6. I’ve been listening to music for more than 40 minutes without closing. I have closed.
I put here the .aia and .apk file. ExoTest.aia (494.1 KB) ExoTest.apk (5.8 MB)
For this test I have not removed the notifier from the status bar. Tomorrow I will try removing the notification from the status bar. Let’s see what happens.
No, I was not charger, in my tests, the problem happens within a few minutes that it closes or the system kills the app. I curiously tried the extension just in case. and I was listening until I decided to stop the test.
On my Samsung Galaxy S8 running android OS v9.0:
If I allow/force the screen to turn off the audio stops after a couple of minutes but if I turn the screen back on, the audio resumes.
It must be different problems, my physical device is not modern, it has android 6. And the devices emulated in android studio always have 100% battery. Maybe if you add partial_wakelock permission to manifest to try on this apk?
I checked your APK:
The same results as before. After about 50-60 sec the sound begins to stutter or stops (depending if only 1 or 2 ExoPlayer are played. Tested on a Galaxy Note8 (Android 9).
Steps to reproduce:
open App
click “Play” or “Play2”
turn of the screen by pressing the power button (standby, sleep mode, black screen)
wait 50-60 sec: sound begins to stutter or after pressed “Play2” (at step 2): sounds stop
The same result seems to occur on a Galaxy S8 (Android 9) as @Ken told in PM.