I have obtained a list of installed app using this code:
public List<ResolveInfo>() {
PackageManager pm=getPackageManager();
Intent main=new Intent(Intent.ACTION_MAIN, null);
main.addCategory(Intent.CATEGORY_LAUNCHER);
List<ResolveInfo> launchables=pm.queryIntentActivities(main, 0);
}
There is only a problem: it list only apps that has a MAIN activity. How can I get a List of all installed apps? Note that I used this code in a project that need that the List is of ResolveInfo, so please answer only code that returns a List of ResolveInfo.
Have you tried with:
List<ApplicationInfo> packages = pm
.getInstalledApplications(PackageManager.GET_META_DATA);
(found here)