There is a code:
private ArrayAdapter <String> plugins = null; Intent mainIntent = new Intent(Intent.ACTION_MAIN, null); mainIntent.addCategory(Intent.CATEGORY_LAUNCHER); List <ResolveInfo> apps = context.getPackageManager().queryIntentActivities(mainIntent, 0); PackageManager pm = context.getPackageManager(); String[] appsList = new String[] { apps.toString() }; plugins = new ArrayAdapter < String > (context, simple_list_item_1.xml, appsList);
Task: from the application name in appsList [i] find out the name of the package.