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
You should use Service for this. Then only you can achieve the background process..Please Go through about Services http://developer.android.com/guide/components/services.html and you can see this also http://www.vogella.com/articles/AndroidServices/article.html both URLs will help you