How To Get The Installed Application Name In A List
I have tried this: final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null); mainIntent.addCategory(Intent.CATEGORY_LAUNCHER); final List pkgAppsList = context.getPackageMana
Solution 1:
You can use the below code ::: Refer this LINK
publicclassAppListextendsActivity {
....
privateArrayListresults=newArrayList();
@OverridepublicvoidonCreate(Bundle savedInstanceState) {
.....
PackageManagerpm=this.getPackageManager();
Intentintent=newIntent(Intent.ACTION_MAIN, null);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
Listlist= pm.queryIntentActivities(intent, PackageManager.PERMISSION_GRANTED);
for (ResolveInfo rInfo : list) {
results.add(rInfo.activityInfo.applicationInfo.loadLabel(pm).toString());
Log.w("Installed Applications", rInfo.activityInfo.applicationInfo.loadLabel(pm).toString());
}
}
}
in the above code "results" is the array list apps installed
Post a Comment for "How To Get The Installed Application Name In A List"