是否有可能得到通知时,任何应用程序正在启动Android设备 [英] Is it possible to get notification when any app is start in android device

查看:133
本文介绍了是否有可能得到通知时,任何应用程序正在启动Android设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想,当我开始在设备中的任何应用程序,那么它应该通知我(编​​程)。 是否有可能在运行时(发射)获得的任何应用程序的通知。

I want that when I start any application in device then it should notify me (programmatically). Is it possible to get notification of any app when run(launch).

推荐答案

没有,这是不是真的有可能使用公共SDK。

No, this is not really possible using the public SDK.

目前最好的,你可以不断地保持轮询 ActivityManager 为前台进程这是正确的放在上面,并保持一个日志的。然而,这不是最准确的,或有效的方法。

At best, you could constantly keep polling the ActivityManager for the foreground process that's right on top, and keep a log of that. However, it isn't the most accurate, or efficient method.

这篇关于是否有可能得到通知时,任何应用程序正在启动Android设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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