How to properly finish (reset) an activity as soon as the user leaves it
<p>I have an Activity that I consider a critical operation (Specific communication with another computer over Bluetooth) and I want to make it so that when the user leaves the activity, it cannot be resumed to that state. With other words, if the user resumes the activity it should be recreated.</p>

<p>Since this activity uses Bluetooth it might start one or two activities for result (<code>Enable-Bluetooth activity</code> and <code>Request-Permissions activity</code>) and therefore, I <strong>cannot</strong> simply <code>finish()</code> the activity in <code>onPause()</code>.</p>

<p>By leaving the Activity, I mean presses the home button, takes a phone call or presses the multitask button</p>

<p>I have experimented with some Activity Launch modes (like singleTask) without success. </p>

<p>I already call <code>super.onCreate(null)</code> in the Activity's <code>onCreate()</code> method, preventing it from recreating to a specific state after it has been destroyed, but I want to reset the activity whether <code>onDestroy()</code> has been called or not.</p>

<p>Does anyone have any suggestions on how this should be done correctly? </p>

<p>Edit:</p>

<p>The question in the Possible duplicate explains how to quit an application and it's subtasks completely (whereas just <code>finish()</code> would suit my needs perfectly - if I knew where to call it). This question is about finding a clean way to not resume the previous state of the Activity. </p>