title: Android Pay - How to detect if Android Pay is installed?
body: <p>There is this code (taken from <a href="https://stackoverflow.com/a/5016624/1369016">https://stackoverflow.com/a/5016624/1369016</a>):</p>
  
  <pre><code>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;
  }
  </code></pre>
  
  <p>But I don't know what to put in the packageName. I tried <code>com.google.android.gms.wallet</code> (which is the package of some Wallet fragments used by Android Pay) but the above method returns false.</p>