为什么应用程序服务重新启动,并且无法重新启动吗? [英] why app service restarting, and not able to restart?

查看:190
本文介绍了为什么应用程序服务重新启动,并且无法重新启动吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是24 * 7跟踪应用程序。每当它停止我使用START_REDELIVER_INTENT重新启动它,但它不是每次启动。它显示在下面的应用程序管理器类型的响应。
请建议。

it is a tracking app of 24*7. Whenever it stops i use START_REDELIVER_INTENT to restart it, but it is not start every time. It shows below type response in Application manager. Please suggest.

推荐答案

我刚刚发现,如果该服务被杀害对4.1.1,START_REDELIVER_INTENT可以采取甚至20分钟,重新启动该服务。重启总是与下一dalvikvm垃圾收集重合。在那之前,服务停留在重新启动,如图中的问题。

I just discovered that if the service is killed on on 4.1.1, START_REDELIVER_INTENT can take even 20 minutes to restart the service. The restart always coincides with the next dalvikvm garbage collection. Until then the service is stuck on "Restarting" as shown in the question.

不过START_STICKY重新被终止秒内的服务。

However START_STICKY restarts the service within seconds of being terminated.

这篇关于为什么应用程序服务重新启动,并且无法重新启动吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆