Skip to content Skip to sidebar Skip to footer

How To Check If App Is Installed On Your Phone?

Is there a way to check if some app is installed on your phone based on a package name? For example is com.google.maps installed on your phone. User would enter package name, click

Solution 1:

whatever test this code from detect-an-application-is-installed-or-not:

    isAppInstalled("com.simexusa.campusmaps_full");

private boolean isAppInstalled(String packageName) {
    PackageManager pm = getPackageManager();
    boolean installed = false;
    try {
       pm.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES);
       installed = true;
    } catch (PackageManager.NameNotFoundException e) {
       installed = false;
    }
    return installed;
}

Post a Comment for "How To Check If App Is Installed On Your Phone?"