Jump to content

Emby won't play audio when screen is locked


Recommended Posts

StewieGreen
Posted

I'm having the same issue. It'll play 2 songs and then stop until I unlock the phone, then the next song plays right away.

 

Samsung galaxy 7

Android 8

WalkingHat
Posted

I'm having this same problem on my Galaxy note 8 on android 8.0.0.

Posted

I know Luke and others are looking into this but I didn't realize this thread was here so I wasted a bunch of time trying to get logs songs switching while the device was locked. I've attached the logs I got, I'm not sure if they'll really be any help but better than just tossing them.

 

I have some development experience with Android, if you have a general idea of where the issue is happening I could try taking a look when I have a chance,

Emby-SongSwitchFail.txt

Emby-SongSwitchSuccess1.txt

Emby-SongSwitchSuccess2.txt

Posted

I have found what I believe is a temporary and simple workaround to the problem. 

 

Simply download an app such as No Screen Off (https://play.google.com/store/apps/details?id=com.k2.no.screen.off) and when activated it will stop your screen from turning off (obviously) and therefore stop your phone from going to sleep keeping your music playing.

Only drawback is that your battery will be drained quicker as your screen will be permanently on.

  • Like 1
Posted

I have found what I believe is a temporary and simple workaround to the problem. 

 

Simply download an app such as No Screen Off (https://play.google.com/store/apps/details?id=com.k2.no.screen.off) and when activated it will stop your screen from turning off (obviously) and therefore stop your phone from going to sleep keeping your music playing.

 

Only drawback is that your battery will be drained quicker as your screen will be permanently on.

 

good idea. Workarround ist fine.

Posted
Not good idea to have screen turned on permanently.... This doesn't help when you drive a car and need to navigation software... music stops even when screen turned on and emby is in background 
 

 

Today I noticed that this happens not only with the network data but also with the content that was synchronized with my smartphone.
Posted

 

Not good idea to have screen turned on permanently.... This doesn't help when you drive a car and need to navigation software... music stops even when screen turned on and emby is in background 
 

 

Today I noticed that this happens not only with the network data but also with the content that was synchronized with my smartphone.

 

 

Hmmm not an ideal workaround then. I haven't driven anywhere I need GPS so hadn't tested Emby in the background, I just turn my brightness all the way down and it's not distracting but the GPS sucks. Need a fix ASAP!

Posted

We are working on it, thanks.

Posted (edited)

Edit: Nope. My fault. The below setting does not fix the issue.

 

Edit 2: The Power and WiFi locks look correct. Does the app make use of the AlarmManager or JobScheduler to load the next item? This would explain the instant continuation as soon as the phone is unlocked (e.g. Alarm is triggered after leaving Doze)

 

Original post (not working):

Better workaround for this release: disable battery optimization for Emby. On my Moto Z's is in "Settings" --> "Battery" --> "..." top right --> Battery optimization --> "Emby" --> Don't optimize

 

The foreground service is not correctly implemented atm and Emby does not ask to be exempted from Doze restrictions. So, emby is not allowed to access the network while the device is in "Doze" mode.

 

https://developer.android.com/training/monitoring-device-state/doze-standby#support_for_other_use_cases

Edited by uglymagoo
Posted

OF course I know this... 

battery optimization switched off for emby app

also emby can work in background and can start services by it self

even 'don't unload from memory' enabled for emby 

 

nothing help

Posted

Not fixed in the current 3.0.20 Beta :(

  • Like 1
Posted

Not fixed in the current 3.0.21 Beta  :(:angry:

Posted

We are actively working on it, thanks guys.

Posted

Not to pile on but I just paid for a month of premier to test music streaming and I am seeing this as well. Pixel XL latest version of Android. Let me know if I can be of any help.

Posted

It happens to me too on Huawei Mate 10 Lite (Android 8.0.0). When I open Emby again the music continues.

Posted (edited)

I just had fun with 3.0.21 on my Android phone in the car yesterday connected via Bluetooth to my car radio. Loading via USB all the time, screen on all the time, Google Maps in foreground for navigation, listening to an audiobook in Emby. Even with Doze not kicking in, I had to switch to Emby after 2-3 tracks to continue playback :/ Downloaded audiobook in Emby.

 

Foreground Emby with PIP-mode Maps was working well.

 

Just the same behaviour I get with the screen turned off.

Edited by uglymagoo
darkassassin07
Posted

For me this issue isn't just with the screen off, but with the app in the background as well. I can be playing music, switch to another app and when the current song stops it won't start the next one until I make emby the active app again even if the screen was never turned off.

 

For the record I don't get this behavior with any other media player such as mediamonkey (what I use to play media that has been synced for offline use) on the same device.

  • 2 weeks later...
Posted

I've got the same behavior (Xiaomi Redmi 5 Plus).

It plays 1 or 2 songs and then it stops playing until I unlock the screen. After that it resumes playing with the next song...

This is currently the only thing that hinder me making emby premier lifetime...

Posted

We are actively working on this. Thanks guys.

  • Like 1
Posted

Thanks Luke. I'll add my device to the list. Pixel 2 running Android 9. Same behaviors as already reported: playback stops if the screen locks or emby is not the foreground app. I'm streaming music when this happens.

Posted

We are actively working on this. Thanks guys.

 

That's great to hear. This issue also exists on a OnePlus 3, Android 8.0.0. If you need me to test a build, let me know.

Posted

Same behaviors as already reported: playback stops if the screen locks or emby is not the foreground app. I'm streaming music when this happens.

Same here. Motorola G6plus Android 8.0.0

Posted

Any update on a possible fix for this core feature?

I've been waiting to listen to an album on my Phone/car since 1 month.

 

:(

Posted

We are actively working on it and hope to have a resolution soon. Thanks.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...