We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
建议增加代码【获取所有已安装的应用】和【获取所有 能够显示在 桌面上的 应用】 获取所有已安装的应用 private List<String> getInstalledPackages(Context context) { List<String> installedPackageList = new ArrayList<>(); List<PackageInfo> installedPackageInfoList = context.getPackageManager().getInstalledPackages(PackageManager.MATCH_UNINSTALLED_PACKAGES); for (PackageInfo packageInfo: installedPackageInfoList) { installedPackageList.add(packageInfo.packageName); } return installedPackageList; }
private List<String> getInstalledPackages(Context context) { List<String> installedPackageList = new ArrayList<>(); List<PackageInfo> installedPackageInfoList = context.getPackageManager().getInstalledPackages(PackageManager.MATCH_UNINSTALLED_PACKAGES); for (PackageInfo packageInfo: installedPackageInfoList) { installedPackageList.add(packageInfo.packageName); } return installedPackageList; }
获取所有 能够显示在 桌面上的 应用 `private List getAllLauncherIconPackages(Context context) { List launcherIconPackageList = new ArrayList<>();
Intent intent = new Intent(); intent.setAction(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_LAUNCHER); //set MATCH_ALL to prevent any filtering of the results List<ResolveInfo> resolveInfos = context.getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_ALL); for (ResolveInfo info: resolveInfos) { launcherIconPackageList.add(info.activityInfo.packageName); } return launcherIconPackageList; }
`
The text was updated successfully, but these errors were encountered:
第一个是有的,AppInfoUtils.getAppLists()、AppInfoUtils.getAppLists(AppInfoBean.AppType.USER)
第二个我找个时间加一下,最近再忙另外的开源项目,准备那个项目提交后,统一把 DevUtils 库都适配到最新然后发个版本。
Sorry, something went wrong.
第二个方法添加了 AppInfoUtils#getAllLauncherIconPackageNames 等我发个版本就可以用了
No branches or pull requests
建议增加代码【获取所有已安装的应用】和【获取所有 能够显示在 桌面上的 应用】
获取所有已安装的应用
private List<String> getInstalledPackages(Context context) { List<String> installedPackageList = new ArrayList<>(); List<PackageInfo> installedPackageInfoList = context.getPackageManager().getInstalledPackages(PackageManager.MATCH_UNINSTALLED_PACKAGES); for (PackageInfo packageInfo: installedPackageInfoList) { installedPackageList.add(packageInfo.packageName); } return installedPackageList; }
获取所有 能够显示在 桌面上的 应用
`private List getAllLauncherIconPackages(Context context) {
List launcherIconPackageList = new ArrayList<>();
`
The text was updated successfully, but these errors were encountered: