intent = new Intent();
intent.setAction(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
packageManager = context.getPackageManager();
resolveInfos = packageManager.queryIntentActivities(intent, 0);
for(var i=0;i<resolveInfos.size();i++){
packageName = resolveInfos.get(i).activityInfo.packageName; //包名
appicon = resolveInfos.get(i).loadIcon(packageManager); //APP图标 icon
appName = resolveInfos.get(i).loadLabel(packageManager).toString();
name = resolveInfos.get(i).activityInfo.name;
log(appName)
}
QQ群 568523841