我正在开发安全应用,我想警告用户哪些应用有危险权限
有没有办法在Android上执行此操作?
答案 0 :(得分:-1)
获取已安装软件包的列表
List<PackageInfo> installedPackages = context.getPackageManager()
.getInstalledPackages(PackageManager.GET_PERMISSIONS);
获取已安装软件包的权限
for (int i = 0; i < installedPackages.size(); i++) {
PackageInfo packageInfo = installedPackages.get(i);
FeatureInfo[] packageFeature = packageInfo.reqFeatures;
PermissionInfo[] packagePermission = packageInfo.permissions;
}