Pages Navigation Menu

Coding is much easier than you think

To find list of permissions used by an installed application in android

To find list of permissions used by an installed application in android

The below code not only retrieves the permission  , but will also retrieve services , receivers . Be  careful on PackageManager tags. This will only fetch you the corresponding information on specific packages .


PackageManager p = this.getPackageManager();
  final List < PackageInfo>; appinstall=p.getInstalledPackages(PackageManager.GET_PERMISSIONS|PackageManager.GET_RECEIVERS|

  for(PackageInfo pInfo:appinstall){
      //PermissionInfo[] permission=pInfo.permissions;
       String[] reqPermission=pInfo.requestedPermissions;
       ProviderInfo[] providers=pInfo.providers;

  int versionCode=pInfo.versionCode;
  Log.d("versionCode-package ",Integer.toString(versionCode));
  Log.d("Installed Applications", pInfo.applicationInfo
    for(int i=0;i < reqPermission.length;i++)
       Log.d("permission list",reqPermission[i]);


About Gokul

I am very much interested in android and Wicket framework. A core android developer and working in android native app development and responsive web mobile design. I have also worked in wicket fame work and java web development. I will keep on updating you about android and wicket framework and answer your query.

%d bloggers like this: