title: Android disable exit application from an activity
body: <p>I got 3 activities in an application. </p>
  
  <ol>
  <li>MainActivity</li>
  <li>ListActivity</li>
  <li>ChildAvtivity</li>
  </ol>
  
  <p>I am redirecting from an activity to another using the following code</p>
  
  <pre><code>Intent intent = new Intent(MainActivity.this, ListActivity.class);
  startActivity(intent);
  finish();
  </code></pre>
  
  <p>And when user press the "back" button, the application must EXIT.</p>
  
  <p>But I want to deny this exit from child activity, ie application need to go back to ListActivity when we press back in ChildActivity.</p>
  
  <p>So I coded like this</p>
  
  <pre><code>Intent intent = new Intent(ListActivity.this, ChildActivity.class);
  startActivity(intent);
  </code></pre>
  
  <p>Working fine. But on this scenario </p>
  
  <ol>
  <li>We are in <code>ChildActivity</code></li>
  <li>Press BACK</li>
  <li>Reach <code>ListActivity</code></li>
  <li>Press BACK</li>
  <li>Application exit</li>
  </ol>
  
  <p>On re-launch, it will directly loads the <code>ListActivity</code> directly.</p>
  
  <p>But my requirement is each and every time when application launches, need to goto <code>MainActivity</code>, ie launching activity.</p>
  
  <p>Any idea for that ?</p>
  
  <p>Thanks in advance</p>