title: Android launchMode="singleTask" and Intent-filters
body: <p>So I have an Activity A that is defined in the AndroidManifest.xml as defined below:</p>
  
  <pre><code>&lt;activity
          android:name=".activity.A"
          android:screenOrientation="landscape"
          android:windowSoftInputMode="stateAlwaysHidden"
          android:launchMode="singleTask"&gt;
  
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;
            &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
        &lt;/intent-filter&gt;
  
  &lt;/activity&gt;
  </code></pre>
  
  <p>This Activity launches a welcome Screen which we will call Activity B.</p>
  
  <p>If you launch the application the Welcome screen is displayed and then once the user is done with it Activity A comes back.</p>
  
  <p>The issue I am having is when I push the "Home" button from the welcome screen I go back to the Home Screen as expected.  Now when I reclick on the Application Icon the application won't launch.  Instead both my Activity A &amp; B get destroyed.  If I click on the icon again then the application relaunches as expected.  </p>
  
  <p>Now if I'm on the welcome screen and push the back arrow and reclick on the App icon it launches the application as expected.  I don't have to push it twice.</p>
  
  <p>Unfortunately I have to use the launchMode="singleTask" since it is a requirement for integration with another team.  I have read the Android API's for Tasks and Back Stacks numerous times.  Any pointers or suggestions would be greatly appreciated.</p>
  
  <p>I came across <a href="http://lilpickle3000.wordpress.com/2013/01/30/android-singletask-launchmode/" rel="nofollow">a blog</a> indicating there is an undocumented bug with using singleTask and intent-filters together but didn't find any official documentation on this.</p>
  
  <p>Thanks     </p>
  
  <p>EDIT
  Launching Activity B like this:</p>
  
  <pre><code>Intent intent = new Intent(context, B.class);
  startActivityForResult(intent, CONST_VAR);
  </code></pre>