简体   繁体   English

获取有关Android应用程序的信息

[英]Get information about Android applications

I was wondering if its possible to get Android application info like (name, version, md5, ...). 我想知道是否有可能获得Android应用程序信息,例如(名称,版本,md5等)。 Is there any API to create a MD5 hash of the application? 是否有用于创建应用程序MD5哈希值的API?

Thanks in advance 提前致谢

You can get a list of all Applications by searching for Activities which handle the Main-Intent. 通过搜索处理主意图的活动,可以获取所有应用程序的列表。

I found that code: 我发现该代码:

final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
final List pkgAppsList = context.getPackageManager().queryIntentActivities( mainIntent, 0);

here: How to get a list of installed android applications and pick one to run 此处: 如何获取已安装的android应用程序列表并选择一个要运行的应用程序

So that just gets a list of the Applications. 这样就可以获取应用程序列表。 I think the md5 sums you want to make on the .apk files (the installation packages?). 我认为您要在.apk文件(安装软件包?)上创建md5总和。 If so i don't know how to find this out, because its possible to have an application isntalled but the .apk is not on the phone anymore i think. 如果是这样,我不知道如何找出原因,因为它可能会使应用程序陷入混乱,但我认为电话中不再存在.apk。

Hope that helps. 希望能有所帮助。

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

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