Android examples for android.content.pm:App
check whether app installed
import android.content.Context; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; public class Main { /**/* ww w. j a va 2 s. c om*/ * check whether app installed * * @param context * @param packageName * @return */ public static boolean checkAppInstalled(Context context, String packageName) { try { context.getPackageManager().getApplicationInfo(packageName, PackageManager.GET_INSTRUMENTATION); return true; } catch (NameNotFoundException e) { return false; } } }