我必须确定我的设备上安装的应用程序使用的每个权限的列表。确定安装的应用程序在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());
}
我如何使用每个应用程序的权限?
谢谢兄弟,这对我很有用 – vuhung3990 2014-04-05 09:42:13