Try the following
try {
startActivity(intent);
} catch (ActivityNotFoundException e) {
// Activity not found, app not installed!
}
Or you can ask the PackageManager
if the package is installed with the following:
private boolean isPackageInstalled(String packagename, Context context) {
PackageManager pm = context.getPackageManager();
try {
pm.getPackageInfo(packagename, PackageManager.GET_ACTIVITIES);
return true;
} catch (NameNotFoundException e) {
return false;
}
}