I’m using the below code to get a list of applications:
List<ApplicationInfo> packages = pm.getInstalledApplications(PackageManager.GET_META_DATA);
Collections.sort(packages, new ApplicationInfo.DisplayNameComparator(pm));
for (int i = 0; i < packages.size(); i++) {
if (packages.get(i).uid > 10000) {
try {
Log.d(pm.getApplicationLabel(packages.get(i));
} catch (NameNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Now the issue is that there are some applications that don’t show in the list, such as Google Navigation. Any idea why this is?
This is what I ended up using that worked perfectly: