获取android已安装的应用PackageInfo
获取已安装的应用
public static ArrayList<AppInfo> getInstalledApps(Context context) {
ArrayList<AppInfo> res = new ArrayList<AppInfo>();
// 获取手机应用的集合
List<PackageInfo> packs = context.getPackageManager()
.getInstalledPackages(0);
for (int i = 0; i < packs.size(); i++) {
PackageInfo p = packs.get(i);
// 定义应用bean对象
AppInfo newInfo = new