0
對不起,這個問題,但我想篩選與權限名稱INTERNET應用列表過濾器的應用程序基於Internet的權限的Android
我該怎麼辦呢?
<uses-permission android:name="android.permission.INTERNET" />
試圖像這樣
PackageManager pm = context.getPackageManager();
List<ResolveInfo> activities = pm.queryIntentActivities(intent, 0);
for (ResolveInfo ri : activities) {
ApplicationInfoclass info = new ApplicationInfoclass();
// Add the non system package to the list
try {
PackageInfo pInfo = context.getPackageManager().getPackageInfo(ri.activityInfo.packageName, 0);
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
info.packageName = ri.activityInfo.packageName;
info.name = (String) ri.loadLabel(pm);
info.icon = ri.activityInfo.loadIcon(pm);
apps.add(info);
}
獲取'PackageInfo',而不是'ApplicationInfo',並期待在'permissions'領域。 – CommonsWare
你好,我打電話給PackageInfo pInfo = context.getPackageManager()。getPackageInfo(ri.activityInfo.packageName,0); 但權限標籤有不同的數據類型如何過濾互聯網任何代碼的幫助? – AndroidBeginnerJhon