title: Activity lifecycle - startActivity() with extras
body: <p>I am currently have two seperate applications, both perform seperate tasks, but there is on limited occasion times when I need one application to use the other if its there.</p>
  
  <p>So I use a function to check the required application exists:</p>
  
  <pre><code>public static boolean isIntentAvailable(Context context, String action) 
  {
      final PackageManager packageManager = context.getPackageManager();
      final Intent intent = new Intent(action);
      List&lt;ResolveInfo&gt; list = packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
      return list.size() &gt; 0;
  } 
  </code></pre>
  
  <p>If it does, then I use the following to start the activity with an extra on there:</p>
  
  <pre><code>if (isIntentAvailable(ListPOI.this, "com.me.myapp.MY_MAP"))
  {
      Intent i = new Intent("com.me.myapp.MY_MAP");
      i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
      i.putExtra("place", true);
      startActivity(i);
  }
  </code></pre>
  
  <p>The setFlags means if the user presses home, and they go back to the first app, it opens, it doesn't open the second app called here.</p>
  
  <p>This all works fine, the first time. However after calling the this the second time, the second app resumes, so it doesn't pick up the 'extra' which has been passed, how can I ensure I get the extra?</p>