获取程序user-permision

 PackageManager manager = getPackageManager();
   List<PackageInfo> appList = manager.getInstalledPackages(PackageManager.GET_PERMISSIONS);
   for(int i=0;i<appList.size();i++)
   {
   String packName= appList.get(i).applicationInfo.packageName;
   Log.i("packName", packName);
    String[] permission=appList.get(i).requestedPermissions;
    if(permission!=null)
   {
     for(int j=0;j<permission.length;j++)
     {
     Log.i("permision", permission[j]);
     }
    }
   }

你可能感兴趣的:(J#)