是否播出的Andr​​oid的应用程序打开时? [英] Does Android broadcast when an app is opened?

查看:138
本文介绍了是否播出的Andr​​oid的应用程序打开时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,如果我想的Youtube打开时就知道了,有没有任何与之相关的直播?我当然知道我可以轮询logcat的消息来检查活动。但我可以做到这一点通过广播,因为这将大大减少耗电。

此链接似乎表明这是不可能的:其中;
<一href=\"http://stackoverflow.com/questions/9012361/how-to-track-app-usage-in-android-how-to-detect-when-an-activity-is-launched\">How跟踪Android应用程序的使用?当一个活动启动如何检测?


解决方案

  

在的Adroid,有没有当一些应用程序是运行结束任何广播?


没有,显而易见的隐私的原因。

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?

解决方案

In adroid, is there any broadcast when some app is opend?

No, for obvious privacy reasons.

这篇关于是否播出的Andr​​oid的应用程序打开时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆