问题
For example, if I want to know when Youtube is opened, is there any broadcast associated with it? I know of course I can poll the logcat message to check the activity. But can I do it through broadcast since it will be much less power-hungry.
This link seems to indicate it is impossible:< How to Track App Usage in Android? How to detect when an activity is launched?
回答1:
In adroid, is there any broadcast when some app is opend?
No, for obvious privacy reasons.
来源:https://stackoverflow.com/questions/10282365/does-android-broadcast-when-an-app-is-opened