Reopen App and not show the previous activity
<p>I am facing a problem right now. When I exit the app, and reopen again, it is showing me the previous activity. Is there any way I can launch MainActivity after re-opening the app again? I tried using but to no avail: </p>

<pre><code>SecondActivity.this.finish();
Intent intent = new Intent (SecondActivity.this, MainActivity.class);
startActivity(intent);
</code></pre>

<p>and </p>

<pre><code>android:noHistory="true"
</code></pre>

<p>Please help me thank you. </p>