2 comments.

  1. Some random IT boy

    Through their AndroidManifest.xml. Apps declare which Intents they're able to handle and there's one for making calls / sending SMS. Just call queryIntentActivities() on an instance of PackageManager, given an ACTION_{WHATEVER_FEATURE_YOU_WANT_TO_CHECK} Intent configured. This will give you a list of all the matches that would appear as if you tried to make a chooser.

  2. Sohaib Ahmed

    You can check by package name of WhatsApp.

    boolean isAppInstalled = appInstalledOrNot("com.whatsapp");

    Using PackageManager,

    private boolean appInstalledOrNot(String packageName) { PackageManager packageManagerm = getPackageManager(); try { packageManager.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES); return true; } catch (PackageManager.NameNotFoundException e) {} return false; }

Add a new comment.