应用程序在Android上安装历史 [英] App Install History on Android
问题描述
有谁知道是否有访问过去的应用程序通过SDK安装的方法吗?我希望能够让用户从市场下载的所有应用程序的列表。
Does anyone know if there's a way to access past app installs via the sdk? I want to be able to get a list of all the apps users have downloaded from the Market.
推荐答案
您可以使用的软件包管理系统。此类包含 getInstalledApplications()
和 getInstalledPackages()
可用于获取有关安装的应用程序的信息。我没有尝试过这些,但如果他们不工作,你也可以尝试 queryIntentActivities()
与 ACTION_MAIN
意图作为参数,以获得可以通过启动器启动的所有活动的信息。
You can use the PackageManager. This class contains getInstalledApplications()
and getInstalledPackages()
which can be used to get information about installed applications. I haven't tried these, but if they don't work you can also try queryIntentActivities()
with the ACTION_MAIN
intent as an argument to get information about all activities that can be launched through the launcher.
当你得到一组安装在设备上的所有应用程序,你可以尝试删除pre-安装Android应用程序来获得用户安装的应用程序列表。我猜测,pre-安装的应用程序是有点静态的,所以你应该能够让他们的名单很容易(比如从一个新创建的Android模拟器)。
When you get a set of all applications that are installed on the device, you can try to remove the pre-installed Android applications to get the list of user installed applications. I guess that the pre-installed applications are somewhat static so you should be able to get a list of them easily (like from a newly created Android emulator).
希望它帮助。
这篇关于应用程序在Android上安装历史的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!