For the last month or so, I have been unable to stream audio when my phone's screen is off. More specifically, exactly 2 minutes after turning off my screen (i.e. locking the screen), streaming audio apps stop playing. I have had the most trouble with the iHeartRadio app, and I'm pretty sure it is Android and/or Samsung related, because I do not have this problem when streaming audio on my iPad.
I have tried changing the Battery settings for the iHeartRadio app (Settings > Apps > iHeartRadio > Battery) to "Unrestricted" use in the background, but the problem continues. I also tried the Battery and device care settings, and this is where the problem from the subject line comes into play. In the "Background usage limits" settings, I have checked the Sleeping apps, Deep sleeping apps, and Never sleeping apps, and none of them lists iHeartRadio as an option. In addition, when I use the "+" button to add it to the "Never sleeping apps" list, iHeartRadio is not in the list of apps.
Ultimately, I think this may be the reason it won't continue to stream in the background, because it's not even listed as an option for Never sleeping apps. This seems especially likely due to the fact that the App>Battery settings are set to Unrestricted background usage and because I don't experience these streaming issues on my iPad. I left a 2-star review on Google Play the other day for the iHeartRadio app because of these issues, but I don't think it's really their issue or their fault. Based on my troubleshooting attempts, it really seems like this is a Samsung Galaxy or Android OS issue.
One interesting anomaly with this problem is that the app will continue streaming after locking the screen when the phone is plugged in or wirelessly charging. That seems to suggest that it is indeed related to battery usage, and the phone seems to recognize that the usual strain streaming places on the battery is now immaterial because it is connected to a power source.
Really hoping this gets some attention, because I'm having similar problems with Pandora streaming, literally as I'm typing this. I started a station on Pandora, locked my phone while listening to it, and although the song finished (maybe it buffers the entire song once it starts?), the streaming then stops and does not play another song until I unlock the phone. This is the same behavior when streaming a radio station on iHeartRadio, and in both cases, it doesn't matter if the app is actively open when the device unlocks or if it is running in the background (i.e. the phone unlocks to the home screen or another actively open app). Anomaly/side note with Pandora is that this app actually is listed in the "Never sleeping apps" list; however, it more or less has the same problem as iHeartRadio.
Solved! Go to Solution.
I stumbled on the solution for this issue, and it had to do with a 3rd party app. In an effort to protect my privacy, I installed the DuckDuckGo app for its background app tracking/blocking. When using the App Overview button (for showing open apps), I noticed a message at the top of the screen that said, "2 active in the background," so I clicked on it because this issue is all about running apps in the background. The two apps were iHeartRadio and DuckDuckGo, so I opened the latter and saw that the banner at the top of the browser said, "App Tracking Protection blocked 158 tracking attempts in iHeartRadio." I was able to manually turn off tracking for iHeartRadio (the app also allowed me to submit an "Issue Report" explaining what problem I believed their App Tracking was causing, which I did), and after turning off tracking, the problem was resolved.
So apparently, something about iHeartRadio's attempts to track my data, usage, etc. while running in the background was triggering DuckDuckGo's App Tracking blocker (erring on the side of caution I suppose) and stopping the streaming. What's interesting and a little bit counterintuitive about that is the fact that when the phone was awake and active, their App Tracking wasn't taking any prohibitive action against the iHeartRadio app and its streaming, but 2 minutes after the phone's screen was turned off or went to sleep due to inactivity, it stopped the live streaming as a way of protecting my privacy. Hopefully they can fine tune that behavior to allow the streaming to continue while still protecting against the tracking attempts.