应用程序在 BlackBerry 中使用多长时间

发布于 2024-12-28 23:41:11 字数 140 浏览 2 评论 0原文

我发现可以通过“ApplicationManager”类中的 getVisibleApplications() 了解哪些应用程序正在运行,但是,是否可以知道这些应用程序使用了多长时间?

谢谢

I've seen is posible to know what applications are running with getVisibleApplications()from "ApplicationManager" class but, is it possible to know how long were these applications used?

Thanks

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

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

发布评论

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

评论(2

日记撕了你也走了 2025-01-04 23:41:11

如果您确实需要此信息,这是可能的。
您可以让后台进程启动一个计时器,并且每 N 分钟它可以调用 getVisibleApplications() 并跟踪已添加或删除到列表中的内容。

困难在于在准确数据和电池寿命之间找到适当的平衡,因为非常小的 N(秒/分钟)值将阻止设备休眠并导致电池寿命严重缩短。 N 值非常大对电池寿命的影响很小,但数据不会很准确。

您还可以将其与事件结合起来......也许您会在背光打开时积极监视,在背光关闭时每小时监视一次。

不太确定你想做什么,所以如果这根本没有帮助,我很抱歉。

If you really needed this information it would be possible.
You could have a background process start a timer and every N minutes it could call getVisibleApplications() and keep track of what has been added or removed to the list.

The difficulty is finding the right balance between accurate data and battery life as a very small value of N (seconds/minutes) will prevent the device from sleeping and will cause severe battery life degradation. A very large value of N will have minimal effect on battery life but the data won't be very accurate.

You could also combine it with events... maybe you would monitor aggressively when the backlight was on and hourly when it's off.

Not really sure what you're trying to do so my apologies if this doesn't help at all.

溺孤伤于心 2025-01-04 23:41:11

简单的答案是,不,您无法确定应用程序的使用时间。出于兴趣,你为什么想知道这个?

Simple answer is, No you cannot the duration of how long the applications were used. Out of interest, why would you want to know that?

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