clapper
پنج شنبه 23 شهریور 1391, 06:43 صبح
من می خوام تو اپلیکیشن یه لیست داسته باشم که اسم و آیکون تمام برنامه های نصب شده روی موبایل رو نمایش بده کد هاش رو هم گیر آوردم ولی نمیدونم چطور از اونا برای ساختن لیستی که گفتم استفاده کنم.
PackageManager pm = getPackageManager();
List<ApplicationInfo> apps = pm.getInstalledApplications(0);
List<ApplicationInfo> installedApps = new ArrayList<ApplicationInfo>();
String label = (String)pm.getApplicationLabel((ApplicationInfo) apps);
Drawable icon = pm.getApplicationIcon((ApplicationInfo) apps);
PackageManager pm = getPackageManager();
List<ApplicationInfo> apps = pm.getInstalledApplications(0);
List<ApplicationInfo> installedApps = new ArrayList<ApplicationInfo>();
String label = (String)pm.getApplicationLabel((ApplicationInfo) apps);
Drawable icon = pm.getApplicationIcon((ApplicationInfo) apps);