How to call Activity from a menu item in Android?
<p>I'm attempting to call startActivity(myIntent) from the click of a menu button but my application crashes at that point.</p>

<p>The same startActivity call works fine from a regular button click, so, I assume the menu button is missing information about the context? Or maybe I'm totally off the mark here.</p>

<p>So... what's the correct way to have a menu item take me to a specific Activity?</p>

<p>I've revised my code based on the initial set of advice.  Still crashing in the same place. The debugger doesn't enter the exception clause, the app just dies. </p>

<p>[EDITED WITH CODE SNIPPET]</p>

<pre><code>public boolean onCreateOptionsMenu(Menu menu) {
  MenuInflater inflater = getMenuInflater();
  inflater.inflate(R.menu.menu, menu);
  return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle item selection
   try{
    switch (item.getItemId()) {
    case R.id.menuItemLang:            
        startActivity(new Intent("com.my.project.SETTINGS"));
        return true;        
    default:
        return super.onOptionsItemSelected(item);
    }
   }catch(Exception e){
      log(e);
   }
}
</code></pre>
