Pattern for activity that starts another activity (for result)
<p>I have an activity where the first thing it does is start another activity for result. when the result comes back, it should process it, then finish. I have the <code>startActivityForResult()</code> call in <code>onCreate()</code>.</p>

<p>What I see is that <em>sometimes</em> when I return from the target activity i started, <code>onCreate()</code> in my activity is called again. this of course re-starts the target activity a second time.</p>

<p>This makes sense and I understand why this is the case, but I don't understand the correct pattern for what I'm trying to achieve. When I return from the activity i started, i don't want to re-start the target activity again obviously ... I just want to run <code>onActivityResult()</code> and finish.</p>

<p>I read where someone suggested setting a state preference, but that seems like a good source for bugs, for example, if it got stuck in the wrong state.</p>

<p>Any thoughts?</p>
