Bring activity to front like launcher do
<p>I had Global FloatButton,when it pressed, it should bring Activity A to front (which is already running).
I try:</p>

<pre><code>Intent intent = new Intent(ApplicationContext,A.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
ApplicationContext.startActivity(intent);
</code></pre>

<p>it work with activity open very slow, and lag 3s or more.</p>

<p>But when I press my app icon in launcher, it open quickly.</p>

<p>Why and How Launcher can do it?</p>