Java tutorial
//package com.java2s; //License from project: Open Source License import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; public class Main { public static boolean isPackageInstalled(Context context, String packagename) { PackageManager pm = context.getPackageManager(); try { PackageInfo info = pm.getPackageInfo(packagename, PackageManager.GET_ACTIVITIES); return info != null; } catch (PackageManager.NameNotFoundException e) { return false; } } }