How to create multiple instances of an activity?
<p>I want to create multiple instances of an activity in the same process. Should I use FLAG_ACTIVITY_NEW_TASK flag like the code below?</p>

<pre><code>                Intent i = new Intent();
                i.setClass(this, A.class);
                i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 
                startActivity(i);
</code></pre>

<p>This code is executed in class A to create another instance of activity A.</p>

<p>This question, will this code create another task? As I understand is a process can only have one task. Does it mean the two activities will exist in different tasks? That's what I want. I want the two activities to be in the same process.</p>

<p>Thanks.</p>
