Android:确定应用程序使用情况

发布于 2024-11-17 09:58:30 字数 208 浏览 6 评论 0原文

我正在开发一个项目(或者将是,如果可能的话),我需要做的关键事情之一是确定应用程序的使用情况。也就是说,哪个应用程序使用最频繁、使用时间最长。

我花了很长时间努力寻找一种直接做到这一点的方法,但一无所获。我知道像 Spare Parts 这样的东西是通过使用私有 API 来实现的,但显然这对我没有帮助。谁能推荐一些有效的方法来收集我需要的数据,或者另一种方法来确定我需要弄清楚的事情?

I'm working on a project (or will be, if this is possible), and one of the key things I need to do is determine application usage. That is, what application are being used most often, and for the longest amount of time.

I have searched long and hard for a way to directly do this, and have come up with nothing. I know that things like Spare Parts achieve it by using private APIs, but obviously that doesn't help me. Can anyone recommend some effective way to gather the data I need, or another way in which to determine the things I need to figure out?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

月亮坠入山谷 2024-11-24 09:58:30

Can you run powertop on Android machines? It's an awesome tool, but it may require infrastructure not supported in default kernel builds.

Less directly related to power, but still capable of giving you full-system information is oprofile. It too might require infrastructure not supported in default kernel builds, but it can show full-system profiling information.

梦幻的味道 2024-11-24 09:58:30

您需要将仪器添加到您自己的应用程序中,以跟踪每个活动的时间。平台中没有这方面的API。

You will need to add instrumentation to your own application that keeps track of the time in each activity. There is no API for this in the platform.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文