Check if an Android application is installed

Standard

You can use this method or create your own method some thing like this:

public static Boolean isInstalled(Context context, String packageName) {
 final PackageManager pm = context.getPackageManager();
 // get a list of installed apps.
 List<ApplicationInfo> packages = pm
 .getInstalledApplications(PackageManager.GET_META_DATA);

 for (ApplicationInfo packageInfo : packages) {
 if (packageInfo.packageName.equals(packageName)) {
 return true;
 }
 }
 return false;
 }