gpt4 book ai didi

没有运行该应用程序的实际进程的 Android 应用程序

转载 作者:行者123 更新时间:2023-11-30 02:31:15 25 4
gpt4 key购买 nike

我正在阅读 "Multitasking the Android Way" by Dianne Hackborn 发现了一个我不太明白的句子(我把莫名其妙的部分加粗了):

A common misunderstanding about Android multitasking is the difference between a process and an application. In Android these are not tightly coupled entities: applications may seem present to the user without an actual process currently running the app; multiple applications may share processes, or one application may make use of multiple processes depending on its needs; the process(es) of an application may be kept around by Android even when that application is not actively doing something.

这怎么可能?要向用户“呈现”一个应用程序,我们至少需要它的一个 Activity 处于恢复状态,为此我们需要启动并运行底层 Linux 进程,对吗?她是在谈论应用程序启动器还是什么?

最佳答案

To "present" an application to the user, we need a least one of its activities to be in resumed state, and for this we need the underlying Linux process up and running, right?

有几种方法可以让用户在没有当前正在运行的应用程序的情况下查看应用程序的用户界面,例如:

  • 应用可以在主屏幕上有一个应用小部件

  • 应用可以在状态栏或 Wear 设备上有一个通知

  • 应用可以在最近任务列表中有一个条目

我的解释是“applications may seem present”指的是像这样的东西。

关于没有运行该应用程序的实际进程的 Android 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27317190/

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