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);
}
}