In my app i want to check whethere any other app launches or not from my app.So i am currently usimg Activitymanager to find the top activity like this
Act
instead of service Use receiver to receive the launch event and there you can implement this code.