title: Android start singleTask activity without intent flag FLAG_ACTIVITY_BROUGHT_TO_FRONT
body: <p>From the Android launcher source code, </p>
  
  <pre><code>if ((intent.getFlags() &amp; Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) !=
          Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) {
      //reset homescreen to default page
  }
  </code></pre>
  
  <p>The launcher resets the homescreen to default page if the startActivity intent does not have the flag FLAG_ACTIVITY_BROUGHT_TO_FRONT. </p>
  
  <p>The flag is only not set if there is already an instance of the activity being started at the top of the stack. </p>
  
  <p>Is there a way to trick the launcher into thinking it's already running in the top of the stack (causing it to reset the homescreen pages) when it is launched from another app? (not from home key press).</p>