I have to determine list of permission used each by the installed application on my device.
I have got the list of applications installed and there package name using the following code:
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());
}
How do I get permission used by each application?
Here how to retrieve the list of the apps installed on an Android device, and the permissions used by every app.
This is the only thing I found, though I've not tested it out.
Let me know if it works for any one:
So i coded it.i needed not just the permissions but also the recievers and services.pls see the following code,hope its useful for others.
}
NOTICE-setting flags is important otherwise it causes problem n u cnt get services ,provider NOTE- NULL CHECK IS IMP OR IT GIVES NPE
also the previous code i wrote ws using activityInfo this one uses packageInfo .it better now i guess :) happy coding ppl :)
Check out freetaskmanager