升级Android上运行的应用程序应用程序、Android

由网友(斜月阑)分享简介:应该重新启动应用程序的Andr​​oid系统时,它的升级,而它的运行?当我们提升我们的应用程序(通过SD卡打开.apk文件)和应用程序正在运行,现有工艺保持各地和升级不会生效,直到我们强制关闭从应用程序管理器应用程序。然而,它是可能的应用是在一些奇怪的状态,不得以某些意图它应该作出反应。所以,我想知道是否,如果我们解决...

应该重新启动应用程序的Andr​​oid系统时,它的升级,而它的运行?

当我们提升我们的应用程序(通过SD卡打开.apk文件)和应用程序正在运行,现有工艺保持各地和升级不会生效,直到我们强制关闭从应用程序管理器应用程序。然而,它是可能的应用是在一些奇怪的状态,不得以某些意图它应该作出反应。所以,我想知道是否,如果我们解决这个特定的中断状态的应用程序将被重新启动或者我们是否需要处理提升自己。

请注意,我know (或者至少是有一些想法)如何以编程方式检测升级。我想知道的是我是否应该或是否应该这样做,如果应用程序在一个正常的状态其他机制。

解决方案   

应该重新启动应用程序的Andr​​oid系统时,它的升级,而它的运行?

我不知道什么应该是预期的行为。但我知道,它的不重新启动应用程序。所以我有一个的BroadcastReceiver 等待 ACTION_PACKAGE_REPLACED 的意图,然后相应地处理应用程序重新启动。

Anbox 在 Linux 上运行 Android 应用程序的简单方式 Linux 中国

Is Android system supposed to restart an application when it's upgraded while it's running?

When we upgrade our application (by opening the .apk from SD card) and the application is running, the existing process stays around and the upgrade does not take effect until we "force close" the application from application manager. However it is likely that the application is in some weird state and may not respond to some intents it should. So I want to know whether the application would be restarted if we fix that particular broken state or whether we need to handle the upgrade ourselves.

Note, that I know (or at least have some ideas) how to detect the upgrade programmatically. What I want to know is whether I am supposed to or whether there is some other mechanism that should do it if the application is in a sane state.

解决方案

Is Android system supposed to restart an application when it's upgraded while it's running?

I dont know what should be the expected behaviour. But I know that it does not restart the app. So I have a BroadcastReceiver waiting for the ACTION_PACKAGE_REPLACED intent and then handle the app restart accordingly.

阅读全文

相关推荐

最新文章