title: Resume Activity after going to home page
body: <p>From my MainActivity (Launcher Activity) I press a button to start my GameActivity. I have it so when I hit the Back button in Game Activity, I don't return to my MainActivity and instead return to my home screen. Now when I resume my app it goes to MainActivity instead of returning to GameActivity despite being shown.</p>
  
  <hr>
  
  <p><strong>Goal</strong></p>
  
  <p>Main Activity -> Game Activity -> Home -> Game Activity</p>
  
  <p><strong>Current Result</strong></p>
  
  <p>Main Activity -> Game Activity -> Home -> Home Activity</p>
  
  <hr>
  
  <p><em>A couple things..</em></p>
  
  <ul>
  <li>It works perfectly when I navigate with my home and menu buttons.</li>
  <li>I have no launchMode in my Manifest</li>
  </ul>
  
  <p>So let us see what I have done!</p>
  
  <hr>
  
  <p><strong>Main Activity Button Click</strong></p>
  
  <pre><code> Button startButton = findViewById(R.id.buttonStart);
      startButton.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              Intent intent = new Intent(MainActivity.this, GameActivity.class);
              //stops back button to return to add player screen
              intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
  
              startActivity(intent);
  
          }
      });
  </code></pre>
  
  <p><strong>Manifest Simplified</strong></p>
  
  <pre><code> &lt;application
      android:allowBackup="true"
      android:icon="@mipmap/ic_launcher"
      android:label="@string/app_name"
      android:roundIcon="@mipmap/ic_launcher_round"
      android:supportsRtl="true"
      android:theme="@style/AppTheme"&gt;
      &lt;activity
          android:name=".MainPage.MainActivity"
          android:label="@string/app_name"
          android:theme="@style/AppTheme.NoActionBar"
          android:screenOrientation="portrait"
          &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=".GamePage.GameActivity"
          android:label="@string/title_activity_game"
          android:theme="@style/AppTheme.NoActionBar"
          android:screenOrientation="portrait" /&gt;
  &lt;/application&gt;
  </code></pre>