Android: Launch new instance of application activity from home screen widget
<p>I have an app widget on the home screen which includes a button that launches a basic settings Activity.</p>

<p>When the user presses the Back button, if the main application has some activities in it's stack, the back press takes you to the most recently viewed Activity in the app, rather than back to the homepage. I've tried the following flags for my intent:</p>

<p><code>settingsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);</code></p>

<p><code>settingsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_TASK_ON_HOME);</code></p>

<p><code>settingsIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);</code></p>

<p>But no luck with any. Is there any flag or combination of flags I can use to do this? Thanks.</p>
