kill the app if it is not in foreground
===

Is there any way to kill the app as soon as it goes to background. For example, if I press the home key and again start the app, it goes to same activity but what I want is that as soon as app goes to background, it should be killed or it should start from the first activity.