title: Android didn't open open activity by url scheme if the app launch already
body: <p>I have StartActivity and MainActivity, in manifest scheme is already set.</p>
  
  <pre><code>    &lt;activity
          android:name=".StartActivity"
          android:label="@string/app_name"
          android:theme="@style/AppThemeNoActionBar"&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;intent-filter&gt;
              &lt;data android:scheme="myApp" /&gt;
              &lt;action android:name="android.intent.action.VIEW" /&gt;
  
              &lt;category android:name="android.intent.category.DEFAULT" /&gt;
              &lt;category android:name="android.intent.category.BROWSABLE" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  
      &lt;activity
          android:name=".MainActivity"
          android:launchMode="singleTask"
          android:parentActivityName=".StartActivity" /&gt;
  </code></pre>
  
  <p>StartActivity:</p>
  
  <pre><code>public class StartActivity extends InstrumentedActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          this.requestWindowFeature(Window.FEATURE_NO_TITLE);
          this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
          setContentView(R.layout.activity_start);
  
          if (isLogin) {
              Intent intent = new Intent(context, MainActivity.class);
              intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
              startActivity(intent);
          }
      }
  }
  </code></pre>
  
  <p>The original design is after user pressed the url in browser, it open StartActivity and then go to MainActivity when user logined.</p>
  
  <p>This works correctly in the first time (App is killed and user pressed the url). 
  But while the app is in the background (in MainActivity), after user press the url, it didn't go through StartActivity but only onResume of MainActivity.</p>
  
  <p>Anyone know the reason? and how to make sure it go to StartActivity? Thanks.</p>