title: How should I define launchMode in AndroidManifest.xml - Using PhoneGap & JQM
body: <p>I am struggling to restrict my application to a single instance. Currently if the user presses home screen to quit the application, then does something outside and clicks on the application's icon again, it launches the App's second instance.</p>
  
  <p>Here is my complete manifest file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.mydomain.qfa"
        android:versionCode="4"
        android:versionName="1.3"&gt;
  
  
  &lt;uses-sdk android:minSdkVersion="7"
            android:targetSdkVersion="13"
            android:maxSdkVersion="18" /&gt;
  
  &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt;
  
  &lt;application 
               android:debuggable=["false"]
               android:testOnly=["false"]
               android:icon="@drawable/icon.png"
  &gt;
  &lt;activity 
              android:name="com.mydomain.qfa"
              android:launchMode=["singleTask"]
              android:alwaysRetainTaskState="true"
              android:icon="@drawable/icon.png"
  &gt;
  &lt;/activity&gt;
  
  &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>Its a single activity app (basically no activities defined). On the main JQM page i have something like these entries:</p>
  
  <pre><code>&lt;div data-role="page" id="HomePage"&gt;
  
      &lt;div data-theme="d" data-role="header" data-position="fixed" style="padding-bottom: 0px;" data-tap-toggle="false"&gt;
  
          &lt;div data-role="navbar"&gt;                                      
  
      &lt;div data-role="content"  class="MainContent"  style="overflow:hidden; padding-top: 0px;"&gt;
  </code></pre>
  
  <p>Can someone please tell me if my Manifest is correct and if I should be using</p>
  
  <pre><code>android:name="com.mydomain.qfa"
  </code></pre>
  
  <p>or should it something else like </p>
  
  <pre><code>android:name="com.mydomain.qfa.HomePage"?
  </code></pre>
  
  <p>or </p>
  
  <pre><code>android:name="com.mydomain.qfa.MainContent"?
  </code></pre>
  
  <p>Thanks in Advance.</p>