title: MapActivity instance management
body: <p>I have a <code>MapActivity</code> subclass and I want to preserve the stack, but I can't keep multiple instances of a <code>MapActivity</code> in the same process. So I have come up with 2 schemes to achieve this:</p>
  
  <ol>
  <li>Pass the state of the <code>MapActivity</code> along with any intents it fires and then let the activities that get switched to reconstruct the <code>MapActivity</code> by sending an intent that recreates the activity. Additionally, the <code>MapActivity</code> would be set so that intents only ever create a single instance of this activity at a time. This approach is flawed as there are multiple exit paths from this activity so all of them would need to be changed to support this.</li>
  <li>Replace the <code>MapActivity</code> with a mock activity that does the recreation of the activity in it's <code>onResume()</code> method or something and then the activities you switch to can remain blissfully unaware of this issue. The problem with this approach is I am unaware about how I should go about creating this mock activity and also fire an intent to start the activity I want to switch to.</li>
  </ol>
  
  <p>So my question is this is there a better way to do this and, if not, how would I go about doing option 2, if it is possible?</p>
  
  <p>EDIT: One possible way to do option 2 is to make the mock activity a waypoint that starts the target activity for you in it's <code>onCreate()</code>. But then one just has to be careful that if the <code>onCreate()</code> gets called again because the activity is being reconstructed, that one doesn't start the target activity again. This can be done by checking that <code>savedInstanceState</code> is <code>null</code>.</p>