Benny
Benny

Reputation: 81

How can i restart my application or service automatically?

Some Android application restarts automatically when i kill process manually. How this can be possible?

Is there anyone who know how to do like this on Android platform?

Upvotes: 0

Views: 1037

Answers (1)

Robert
Robert

Reputation: 7053

Are you sure these applications are restarted automatically?

I suspect that they actually have a few activities on top of each other. When you kill a process in Android, only the top activity will be destroyed, other activities are still on the activity stack. In other words, when you return from the "process killer activity" another of the application's activity becomes visible, and the process is restarted.

This is not something that you need to implement in your application, it is just how Android works.

Upvotes: 1

Related Questions