Is there a way to tell if an app can be launched? I have the list of installed apps with "getPackageManager().getInstalledPackages(0)" call. Not all the items retrieved in this list can be launched. For ex, "Android System", "TTS Service" cannot be launched. How do I filter out the apps that can be launched from the ones that cannot?
Thx! Rahul.
You can get the main Intent as follows for a particular package name:
Intent mIntent = ctx.getPackageManager().getLaunchIntentForPackage(packageName);
If there is no main Activity to be launched, the intent will be null
if (mIntent == null) {
//Cannot be launched
}
If the intent isn't null, then it can be launched.