title: Dynamic start activity in Android?
body: <p>Is there a way to dynamically change the starting activity in Android based upon a conditionally?  What I attempted to do (that didn't work) was the following:</p>
  
  <ol>
  <li>remove the LAUNCHER category as defined in my AndroidManifest.xml</li>
  <li>create a custom Application class that the app uses</li>
  <li>override the onCreate method of my Application class to define some code like the following:</li>
  </ol>
  
  <p>.</p>
  
  <pre><code>if (condition) {
      startActivity(new Intent(this, MenuActivity.class));
  } else {
      startActivity(new Intent(this, LoginActivity.class));
  }
  </code></pre>