For some reason, music streaming services stop or pause playing a song whenever a Samsung Galaxy phone is on lock screen or timeout screen. It should not be the case as users should be able to listen to music even when they are not using their phones. However, such a case happens to a lot of people.
If you are among the Samsung Galaxy mobile device users who encountered this issue, there are workarounds that you can try for you to resolve this error. Check them out below.
Workarounds to Fix Samsung Galaxy Mobile Device Pauses or Stops Playing Audio when Screen Turns Off or Locked

There may be potential causes of why your music is turned off when your Galaxy phone is on screen timeout or the display turns off. It may be due to battery optimization or permissions issues. Let us try to work our way around on the problem.
1. Try Turning Off Battery Optimization
Open the Settings menu of your Samsung device and head over to Apps. Tap the three-dotted icon and select Special Access. Go to Optimise Battery Usage and turn it off.
2. Disable Sleep on your Music Streaming App

Launch the Settings and go to Device Care. Select Battery and select Background usage limits. Disable the Put unused apps to sleep option. Now, tap Sleeping apps and select your music streaming app. You can also do the same with Deep sleeping apps.
3. Mark your App as Unrestricted
On the Settings menu, head over to Apps. Select your music streaming app and tap Battery. Select Unrestricted.
4. Enable Data Saver While Using App
On your Settings menu, go to Apps and tap the three-dotted icon. Navigate to Special Access and look for Allow app while data saver on. Enable the option.
5. Allow App Permission
It is possible that your app does not have the necessary permissions hence it is pausing or stopping. Go over to the settings of your music streaming app and verify the device permissions. Make sure to enable them.
6. Turn On Lock Screen Notifications
On your Samsung device, open the Settings menu and select Notifications. Tap Lock Screen Notifications. Tap Show Content and tap the gear icon next to it. Look for your music streaming app and enable it.
7. Disable Power Saving on your Samsung Phone
On the settings menu, go to Device Care. Select Battery and turn off the Power Saving option.
Wrapping Up!
There are several possible solutions that can help you resolve the error on your Samsung mobile phone. You can try to work on these methods above one at a time and check if it works for you.