title: Error while opening another app from my app
body: <p>I'm trying to open another app from my app .
  if that app is not installed my code will open the market place.
  i use this code</p>
  
  <pre><code>PackageManager pm = getPackageManager();
  try
  {               
   Intent intent = pm.getLaunchIntentForPackage(package_name);
   startActivity(intent);
  }    
  catch(android.content.ActivityNotFoundException anfe)
  {
  startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + package_name)));
  }
  </code></pre>
  
  <p>if <code>market</code> is not presence in the device i should open 
  <code>http://play.google.com/store/apps/details?id=&lt;package_name&gt;</code> this url.
  how to catch the exception at second time?
  i have already used catch in my code ! can i one more?
  i'm new for OOP. </p>