gpt4 book ai didi

android - 我想知道 Android 本身在什么情况下会杀死您的应用程序?

转载 作者:行者123 更新时间:2023-11-30 03:17:16 26 4
gpt4 key购买 nike

我正在处理闹钟,它大部分时间都在工作,但有时它不起作用。然后我发现它会一直工作,直到你的应用程序没有被杀死或设备已经重新启动。我不会重新启动我的设备,所以只是原因可能是我的应用程序被杀死了。所以我的问题是基于 Android 本身杀死我的应用程序的条件和标准。

最佳答案

根据doc

Android might decide to shut down a process/app at some point, when memory is low and required by other processes that are more immediately serving the user. Application components running in the process that's killed are consequently destroyed. A process is started again for those components when there's again work for them to do.

When deciding which processes to kill, the Android system weighs their relative importance to the user. For example, it more readily shuts down a process hosting activities that are no longer visible on screen, compared to a process hosting visible activities. The decision whether to terminate a process, therefore, depends on the state of the components running in that process.

关于android - 我想知道 Android 本身在什么情况下会杀死您的应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19829181/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com