how to check the top activity from android app in background service

后端 未结 4 403
一个人的身影
一个人的身影 2020-12-18 17:21

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         


        
4条回答
  •  抹茶落季
    2020-12-18 17:53

    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

提交回复
热议问题