I tried some of the solutions found here but they all have some kind of errors.
Here's what I got:
final PackageManager packManager = getPackageManager();
List<ApplicationInfo> appsInfo;
appsInfo = packManager.getInstalledApplications(PackageManager.GET_META_DATA);
for ( int i = 0 ; i < appsInfo.size() ; i++ ) {
if (/*app is not launchable*/) {
appInfo.remove(i);
}
}
What I want to know is:
- What is the condition that should go inside that if statement?
- Surely there has to be a faster way to get launchable apps other than getting all the apps then looping through them to remove the un-launchable ones? I'm hoping for a statement similar to getInstalledApplications like above except it only returns launchable apps.
- Sorry I'm a beginner but what does GET_META_DATA in the above code do and should something else be in its place?