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

后端 未结 4 404
一个人的身影
一个人的身影 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:57

    instead of service Use receiver to receive the launch event and there you can implement this code.

提交回复
热议问题