Skip to content Skip to sidebar Skip to footer

Why App Service Restarting, And Not Able To Restart?

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. Ple

Solution 1:

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.

However START_STICKY restarts the service within seconds of being terminated.

Solution 2:

What version of Android are you trying this on?

Android 4.4.x (API 19) has some issues with background services being killed and not restarted, regardless of flags. These bugs have been widely reported but there has been no official acknowledgement of them by anyone with AOSP.

Here are links to the relevant Android issue tracker reports: #63618 and #63793.

Post a Comment for "Why App Service Restarting, And Not Able To Restart?"