Android:获取在Android设备中安装的列表

时间:2015-07-20 05:46:09

标签: android

有没有办法以编程方式使用java获取安装在Android设备上的所有游戏的列表?

提前致谢。

2 个答案:

答案 0 :(得分:0)

Try this code


final PackageManager pm = getPackageManager();
 //get a list of installed apps.
List<ApplicationInfo> packages =  pm.getInstalledApplications(PackageManager.GET_META_DATA);
for (ApplicationInfo packageInfo : packages) {
Log.d(TAG, "Installed package :" + packageInfo.packageName);
Log.d(TAG, "Source dir : " + packageInfo.sourceDir);
Log.d(TAG, "Launch Activity :" + pm.getLaunchIntentForPackage(packageInfo.packageName)); 
} 

答案 1 :(得分:0)

点击网址

https://play.google.com/store/apps/details?id=your.package.name

从源头上你会得到像

这样的东西
<span itemprop="genre">Shopping</span> 

或者您可以使用marketer-api