I have made a default cordova app and adjusted only the index.html file:
<!DOCTYPE html>
<html>
<body>
<div id="d"></div>
<script type="text/javascript">
var $_d = Math.round(999 * Math.random());
document.getElementById('d').innerHTML = $_d;
</script>
</body>
</html>
When I build and install the app on my phone, the app will restart every time I restart the app through the short cut or when I click the app in the list of active apps. I notice the app has restarted, since the displayed number has changed. I would hope to prevent the app from restarting, so the number is not changing.
I have tried to accomplish this by adding <preference name="AndroidLaunchMode" value="singleTask"/> to the config.xml file. The AndroidManifext.xml is updated as a result, but it doesn't have the desired effect.