[英]Foreground app being killed when screen is off
I have a problem on my android phone where the app that I'm running in the foreground is getting killed if the screen is off.我的 Android 手机出现问题,如果屏幕关闭,我在前台运行的应用程序就会被杀死。 Examples include: listning to a podcast with stitcher, using voice mavigation with google maps, having an ongoing call using a voip app, listning to an audio book with audible.
示例包括:使用拼接器收听播客、使用谷歌地图进行语音导航、使用 voip 应用程序进行持续通话、收听有声读物。
Apps get killed off at some random point when the screen is off.当屏幕关闭时,应用程序会在某个随机点被杀死。 eg sometimes it'll happen after a minute, sometimes i'll be 30 mins in a drive and a podcast will just cut out.
例如,有时它会在一分钟后发生,有时我会开车 30 分钟,播客就会中断。 After this happens, if I unlock my phone, I'm back on my home screen.
发生这种情况后,如果我解锁手机,我就会回到主屏幕。
Things I have tried:我尝试过的事情:
Other information about my phone:我的手机的其他信息:
So this is super annoying because it basically prevents me from using the phone for anything useful unless I keep the screen on.所以这非常烦人,因为它基本上阻止我使用手机做任何有用的事情,除非我保持屏幕打开。 I know I can darken the screen as much as possible, so keeping the screen on reduces battery drain, this is ok for navigation but not good enough for when you want to keep your phone in your pocket.
我知道我可以尽可能地使屏幕变暗,所以保持屏幕开启可以减少电池消耗,这对于导航来说是可以的,但当你想把手机放在口袋里时还不够好。
I was blaming RAM - ie somehow I'm running out of RAM and android is killing the app that's using the most.我在责怪 RAM - 即不知何故,我的 RAM 用完了,而 android 正在杀死使用最多的应用程序。 But it makes no sense to kill the foreground app.
但是杀死前台应用程序是没有意义的。
Open to any and all suggestions, even if it's a long shot.对任何和所有建议持开放态度,即使这是一个远景。
I'm not concerned about battery life at all.我根本不关心电池寿命。 If there's any other battery saving / optimization features I can turn off, I'm all for it.
如果我可以关闭任何其他省电/优化功能,我完全赞成。
由于后台执行限制。为了保持您的应用程序不被杀死,您必须创建一个前台服务
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.