How to detect when the user launches another app? (Android)

前端 未结 4 2059
星月不相逢
星月不相逢 2020-11-30 04:24

I\'m trying to build an application where my application runs in the background and detects when the user launches another application so that I can control the flow from th

4条回答
  •  一个人的身影
    2020-11-30 05:01

    In my book, by the way you posed the question, that sounds like hi-jacking an app in a certain way for your service to control, bordering on malware jinx. But it will not work in Android - plain and simple due to the permissions of each application is different. Thereby, each app are isolated from one another. So to answer your question bluntly, its No.

    As the other answer suggested - you can monitor the logcat but.. then again... why?

提交回复
热议问题