如何让我启动了由操作系统被杀死?

编程入门 行业动态 更新时间:2024-10-28 22:28:25
本文介绍了如何让我启动了由操作系统被杀死?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我工作的第三方Android启动的一个项目。我发现在后台运行时,它常常被杀害的操作系统,即使它是默认的启动器。

I am working on a project of 3rd-party Android Launcher. I find it being killed often by OS when running in background, even it is the default Launcher.

操作系统会杀了很多的应用程序时,可用内存是不够的,我是客人为什么我的启动被杀害的原因。

OS will kill many apps when available memory is not enough, I guest that the reason why my Launcher is killed.

所以我的问题是我应该怎么办,以减少被杀害的机会呢?

So my question is what should I do to decrease the chance of being killed ?

推荐答案

没有。你应该找到一种方法来处理,其中OS杀死你的进程时,使用的是哈克的方法来保持它在内存中是坏的,不好的设计,并可能导致各种不同设备上的问题。

Nothing. You should find a way to handle the event where the OS kills your process, using a hacky approach to keep it in memory is bad, bad design and could lead to all sorts of issues on different devices.

您真的应该甚至不关心系统杀死你的过程中,发射器应处理的意图,要么如果present恢复或启动,如果杀了。

You really shouldn't even care that the system is killing your process, the launcher should handle an intent and either resume if present or start if killed.

更多推荐

如何让我启动了由操作系统被杀死?

本文发布于:2023-11-27 05:49:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1636845.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:让我   被杀   操作系统   启动了

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!