title: Resume previous instance and state of activity
body: <p>I have two activities in my project -- <code>MainActivity</code> and <code>ChildActivity</code>, and <code>MainActivity</code> has a button to start <code>ChildActivity</code>. I want the button to start a new <code>ChildActivity</code> if the user hasn't already opened one before, and an old instance of <code>ChildActivity</code> if it has already been opened before (thus saving its previous state, similar to how <code>onBackPressed()</code> resumes the previous activity on the stack with its original state).</p>
  
  <p>I have tried implementing this by adding <code>addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT)</code> in <code>MainActivity</code> when making the <code>intent</code> to call <code>ChildActivity</code>, and also by changing the <code>AndroidManifest.xml</code> file so that the <code>ChildActivity</code> only ever has a single instance like so: <code>android:launchMode="singleInstance"</code>.</p>
  
  <p>However, none of these solutions work because a new <code>ChildActivity</code> gets produced every time I click the button in <code>MainActivity</code>.</p>