title: Android TaskStackBuilder.startActivities() doesn't work as expected
body: <p>Possible douplicate of <a href="https://stackoverflow.com/q/13632480/513413">Android - Build a notification, TaskStackBuilder.addParentStack not working</a></p>
  
  <p>Although there are a lot of questions answered about this topic but none of them solved my problem. I'm actually, playing with all of them but couldn't get them into work :(</p>
  
  <p>I have a Splash Screen, I'm checking a flag (I get it from backend) and navigate user to SecondActivity, for example, instead of FirstActivity if flag is true.</p>
  
  <p>My Manifest is like this:</p>
  
  <pre><code>&lt;activity
              android:name="com.package.name.SplashActivity"
              android:label="@string/app_name"
              android:screenOrientation="portrait"
              android:theme="@style/AppTheme.NoActionBar" &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;
          &lt;activity
              android:name="com.package.name.Firstctivity"
              android:label="@string/app_name"
              android:screenOrientation="portrait" &gt;
          &lt;/activity&gt;
          &lt;activity
              android:name="com.package.name.SecondActivity"
              android:label="@string/title_tracking"
              android:screenOrientation="portrait"
              android:parentActivityName="com.package.name.Firstctivity"&gt;
              &lt;meta-data
                  android:name="android.support.PARENT_ACTIVITY"
                  android:value="com.package.name.Firstctivity" /&gt;
          &lt;/activity&gt;
  </code></pre>
  
  <p>I'm calling following method in onResume() method of SplashScreen Activity:</p>
  
  <pre><code>private void checkFlag()
      {
          ...
  
          if (flag == null)
          {
              return;
          }
  
          // show tracking screen
          final Intent intent = new Intent(SplashActivity.this, SecondActivity.class);
          intent.putExtra(SecondActivity.EXTRA_ID, "1234");
          intent.putExtra(SecondActivity.EXTRA_ACTION, SecondActivity.ACTION_VISITING);
          intent.putExtra(SecondActivity.EXTRA_LIVE_STATUS, true);
  
          TaskStackBuilder sBuilder = TaskStackBuilder.create(SplashActivity.this);
          sBuilder.addNextIntent(new Intent(SplashActivity.this, FirstActivity.class));
          sBuilder.addNextIntent(intent);
          sBuilder.startActivities();
  
          SplashActivity.this.finish();
      }
  </code></pre>
  
  <p>Now, when user launches the app and flag is not null then he will be directed to SecondActivity. However, by click on back button application closes but I expect to see FirstActivity instead.
  In SecondActivity, by click on up carret user navigates to FirstActivity which I expect to see same behavior if user clicks on back button.</p>
  
  <p>Any suggestion would be appreciated. Thanks. </p>