public void getLaunchApk(){
Intent intent = new Intent(Intent.ACTION_MAIN,null);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
PackageManager pm = getPackageManager();
List<ResolveInfo> resolve = pm.queryIntentActivities(intent,0);
Collections.sort(resolve, new ResolveInfo.DisplayNameComparator(pm));
for (int i = 0; i < resolve.size(); i++) {
ResolveInfo res = resolve.get(i);
Log.e("getLauchnerApk", res.activityInfo.packageName);
}
}
Intent intent = new Intent(Intent.ACTION_MAIN,null);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
PackageManager pm = getPackageManager();
List<ResolveInfo> resolve = pm.queryIntentActivities(intent,0);
Collections.sort(resolve, new ResolveInfo.DisplayNameComparator(pm));
for (int i = 0; i < resolve.size(); i++) {
ResolveInfo res = resolve.get(i);
Log.e("getLauchnerApk", res.activityInfo.packageName);
}
}
682

被折叠的 条评论
为什么被折叠?



