Activated and Deactivated events monitors the activation status of an application.