title: Cordova - modify or remove MainActivity
body: <p>I am developing a Cordova application which should run in a "Kiosk" mode - the device will be locked to that app and should not be able to exit.</p>
  
  <p>To achieve this I am using a slightly modified version of <a href="https://github.com/honza889/cordova-plugin-kiosk" rel="noreferrer">cordova-plugin-kiosk</a>, which provides an extra activity (<code>KioskActivity</code>) that is defined as a launcher (it has <code>android.intent.category.HOME</code>).</p>
  
  <p>This works reasonably well. However, the app still has the original cordova MainActivity, which causes some confusion, especially as this is what gets launched by the icon in the original launcher, and by the <code>cordova run android</code> command. It also results in two entries in the Chrome remote inspector.</p>
  
  <p>The <code>AndroidManifest.xml</code> looks like this at the moment:</p>
  
  <pre><code>    &lt;activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|uiMode" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize"&gt;
          &lt;intent-filter android:label="@string/launcher_name"&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;
      &lt;activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|uiMode" android:label="@string/activity_name" android:launchMode="singleInstance" android:name="jk.cordova.plugin.kiosk.KioskActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:windowSoftInputMode="adjustResize"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
              &lt;category android:name="android.intent.category.DEFAULT" /&gt;
              &lt;category android:name="android.intent.category.HOME" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p>I would like to merge these into a single activity and do away with the confusion.</p>
  
  <p>I can see 2 possible ways to do this:</p>
  
  <ol>
  <li>Find a way to remove the <code>MainActivity</code> section from the <code>AndroidManifest.xml</code>, and hopefully also to make <code>cordova run android</code> run <code>KioskActivity</code> instead.</li>
  <li>Find a way to modify <code>MainActivity</code> and move the code from <code>KioskActivity</code> into it.</li>
  </ol>
  
  <p>However, I cannot find any sensible way to achieve either of these without causing more confusion by breaking all the cordova tools.</p>