title: Starting Activity on condition produces a flicker on screen
body: <p>I have a UI-less <code>MainActivity</code>, which holds certain logic to determine if the user is already logged in or not. If the user is logged in, I am starting <code>HomeActivity</code> and if not, then <code>LoginActivity</code>. Even though the logic is working fine, I am seeing that the <code>MainActivity</code> does start for a brief while before switching to desired activity. Is there any way to avoid bringing up <code>MainActivity</code> altogether as it causes an annoying flicker ?</p>
  
  <p>Here is my code (omitting the logic) - </p>
  
  <pre><code>public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          if (condition) {
              intent = new Intent(this, HomeActivity.class);
          } else {
              intent = new Intent(this, LoginActivity.class);
          }
  
          startActivity(intent);
          finish();
      }
  }
  </code></pre>
  
  <p>Thanks in advance.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>This is what I have in my android manifest - </p>
  
  <pre><code>    &lt;activity
          android:name="org.step.main.MainActivity"
          android:label="@string/app_name"
          android:launchMode="singleInstance" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  </code></pre>