简体   繁体   English

如何获取Android上“最常用的应用”列表

[英]How to get list of “most used apps” on Android

Android has a feature that allows you to sort your apps according to "most used first" Android具有一项功能,可让您根据“最常用的应用”对应用进行排序

I am using the ACTION_SEND feature and I need to filter the messaging apps to send that message. 我正在使用ACTION_SEND功能,并且需要过滤消息传递应用程序才能发送该消息。 I want to order the list of available messaging apps in decreasing order of daily usage - Is this order and list accessible on any class similar to PackageManager? 我想按每天使用的递减顺序对可用消息传递应用程序列表进行排序-是否可以在类似于PackageManager的任何类上访问此命令和列表?

There is no such API within PackageManager or similar. PackageManager或类似物中没有此类API。

(Where in Android are you seeing a sort order of "most used first"? It's easy enough for some launcher to keep a count of which apps are launched most through it, but the OS as a whole does not make "most used" information available). (您在Android的哪个位置看到“最常使用的应用”的排序顺序?对于某些启动器来说,很容易就能统计出最常通过哪个应用启动的应用程序,但整个OS不会提供“最常用的”信息可用)。

Some apps have tried to keep track of this information by running a service that continually monitors what the current foreground app is - but when they see what this does to battery life they give up and decide they don't need to know that information! 一些应用程序试图通过运行一项服务来不断跟踪当前前景应用程序,从而跟踪这些信息,但是当他们看到这对电池寿命有何影响时,他们会放弃并决定不需要知道该信息!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM