Simulating key press in android or creating showing options menu on start up
<p>I am looking for a way to show the options menu when the app starts up.</p>

<p>I've tried using openOptionsMenu() in my onCreate() function, but that throws a null error.</p>

<p>So I tried simulating the menu button keypress with:
        KeyEvent eventDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK);
        KeyEvent eventUp = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK);
        dispatchKeyEvent(eventDown);
        dispatchKeyEvent(eventUp);  </p>

<p>but that doesn't seem to do anything at all.</p>

<p>Does anyone have any suggestions as to how I would be able to open the menu on start up, or at least simulate the menu button key press?</p>
