[
https://issues.apache.org/jira/browse/CB-6048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14009954#comment-14009954
]
Frederico Costa Galvão commented on CB-6048:
--------------------------------------------
I forgot to mention that those were actually expected details indeed, I just
thought that if that setting is new and its default value is desired but not
applied then it's to be considered a bug, which my tests proved.
I don't think it's an issue with the upgrade per se, but instead in how the
AndroidManifest output handles what is desired or defined as *default values*.
launchMode='singleTop' is now considered a default, but if I don't declare it
then it's not applied, and this is not what default means. If the
AndroidManifest parser doesn't find a setting on my config.xml for that, it
should output the default value. It somehow tries to do that by merging the
deafults.xml with my root config.xml into the final platform/res/xml/config.xml
but that final output isn't used anywhere usefull regarding this specific
setting, so...
I had already done that last test you asked for by the time I upgraded and saw
there was a new setting available in the defaults.xml (I keep all available
settings for all my platforms in my root xml to keep track of what's possible
and what I've modified from the defaults), and it works okay if I define the
setting in my root config.xml. I didn't apply it initially because I wanted to
know the reasoning behind the change, which you have already provided me :)
> Add config setting for Android app launchMode
> ---------------------------------------------
>
> Key: CB-6048
> URL: https://issues.apache.org/jira/browse/CB-6048
> Project: Apache Cordova
> Issue Type: New Feature
> Components: Android, CLI
> Reporter: Michal Mocny
> Assignee: Michal Mocny
>
> As raised on mailing list: "[Android] Apps restart instead of resume when
> brought to focus by clicking app icon"
> "TLDR; AndroidManifest.xml <activity> needs: android:launchMode="singleTop"
> -- can I add it?
> Quick search brings up:
> http://stackoverflow.com/questions/10122449/phonegap-android-application-restarting-instead-of-resuming-although-it-was-not
> ..which advises to add android:launchMode="singleTask" to AndroidManifest.xml
> <activity>, which does fix the issue.
> According to the descriptions in
> http://developer.android.com/guide/topics/manifest/activity-element.html the
> differences mostly stem in how the app handles intents, however, there is a
> comment in the table of descriptions which labels singleTask launchMode as
> "(not recommended for general use)".
> On the other hand, singleTop mode *is* recommended, and also fixes the issue,
> and according to the description, sounds to me like a much better default."
--
This message was sent by Atlassian JIRA
(v6.2#6252)