title: Get package name of another app by app name
body: <p>I want to know the package name of an app and i only know the app name of that app. suppose i want to know the package name of an email app by just its name then how to get it<br>
  i just know the app name.</p>
  
  <pre><code>final PackageManager pm = getPackageManager();
  //get a list of installed apps.
  List&lt;ApplicationInfo&gt; packages = pm.getInstalledApplications(PackageManager.GET_META_DATA);
  
  for (ApplicationInfo packageInfo : packages) {
       Log.d(TAG, "Installed package :" + packageInfo.packageName);
       Log.d(TAG, "Launch Activity :" + pm.getLaunchIntentForPackage(packageInfo.packageName));
  }
  </code></pre>
  
  <p>this is the code to get the package name of all the app but i need to know for particular app.</p>