[
https://issues.apache.org/jira/browse/CB-6048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14009815#comment-14009815
]
Michal Mocny commented on CB-6048:
----------------------------------
Thanks for the extra details and isolated tests.
That it is NOT in top-level `config.xml` is expected.
That it is NOT in `platforms/android/res/xml/config.xml` until after a 'build'
is fine, because it seems you have to run `prepare` after an `update` which
`build` does automatically.
May you do one more test for me, please? I'd like to isolate if this is a
problem only with upgrades from 3.4 or if it isn't working for you ever. May
you create a new project with 3.5 and see if the setting applies to your
`AndroidManifest.xml`, please?
> 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)