Track activities; getCurrentActivity, check whether application is running or not, finish all activities, and so on.