How to find the Specific Application is Installed or not by his Name?
<p>I want to know that the specific Application as App1 is Installed or Not on my App.<br>
Here I don't know the actual package name of that App1(App1 is only name).<br>
Then How to find that application is currently installed or not?<br>
I have tried this ,   </p>

<pre><code>private static final String PACKAGE_NAME = "App1";

/**
 * Returns true if "App1" is installed. 
 */
public static boolean isApp1Installed( Context context )
{
    boolean output = false;
    PackageManager pm = context.getPackageManager();
    try { 
        PackageInfo pi = pm.getPackageInfo( PACKAGE_NAME, 0 );
        if( pi != null )
        {
            output = true;
        }
    } catch (PackageManager.NameNotFoundException e) {}
    return output;
}
</code></pre>

<p>Please Help Me..</p>
