小编nia*_*nia的帖子

确定Android中已安装应用程序使用的权限列表

我必须确定我的设备上已安装的应用程序使用的权限列表.

我已经安装了应用程序列表,并使用以下代码包名:

PackageManager pm = this.getPackageManager();
Intent intent = new Intent(Intent.ACTION_MAIN, null);
intent.addCategory(Intent.CATEGORY_LAUNCHER);

List<ResolveInfo> list = m.queryIntentActivities(intent,PackageManager.PERMISSION_GRANTED);

  for (ResolveInfo rInfo : list) {   
   Log.d("Installed Applications", rInfo.activityInfo.applicationInfo
     .loadLabel(pm).toString());
   Log.d("packegename",rInfo.activityInfo.applicationInfo.packageName.
           toString());
     }
Run Code Online (Sandbox Code Playgroud)

我如何获得每个应用程序使用的权限?

permissions android

3
推荐指数
2
解决办法
6123
查看次数

标签 统计

android ×1

permissions ×1