Trouble using onPause() method
<p>I have an activity.. when it is calls <code>onPause()</code> it starts a new activity.. Problem is when I lock screen of my phone..It calls the <code>onPause</code> which cause it to go back to the main activity but I want to stay in that activity.. Is there a way to fix this ?</p>

<p>This is the code snippet if it helps.. </p>

<pre><code>@Override
protected void onPause() {
    super.onPause();
    call_next_activity(call_next_act);
}

private void call_next_activity(Boolean call_next) {
    if (!call_next)
        return;
    Intent select_one;
    if (program_id) {
        select_one = new Intent("c.theworld.com.nikhil.MENU");
    } else {
        select_one = new Intent("c.theworld.com.nikhil.CHAPTER");
        Chapter.call_menu = true;
    }
    startActivity(select_one);
}
</code></pre>
