Github user mmocny commented on a diff in the pull request:

    https://github.com/apache/cordova-cli/pull/164#discussion_r11924705
  
    --- Diff: src/metadata/android_parser.js ---
    @@ -97,6 +108,29 @@ module.exports.prototype = {
                 }
             }
     
    +        // Set launchMode in AndroidManifest
    +        var launchModePref = this.findLaunchModePreference(config);
    +        if (launchModePref) {
    +            var act = manifest.getroot().find('./application/activity');
    +            switch (launchModePref) {
    +                case 'standard':
    +                    act.attrib["android:launchMode"] = 'standard';
    +                    break;
    +                case 'singleTop':
    +                    act.attrib["android:launchMode"] = 'singleTop';
    +                    break;
    +                case 'singleTask':
    +                    act.attrib["android:launchMode"] = 'singleTask';
    +                    break;
    +                case 'singleInstance':
    +                    act.attrib["android:launchMode"] = 'singleInstance';
    +                    break;
    +                case 'default':
    +                    delete act.attrib["android:launchMode"];
    --- End diff --
    
    As of this change: 
https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;h=298cd9e  there 
is a new default value for android projects for launchMode (singleTop).
    
    If we make this change, we are reverting to a default launchMode of 
standard, which I do not think is a great default for cordova apps.  We can 
solve the problem by changing the parser, or by setting the default launchMode 
in defaults.xml.  I'm happy with the second option!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to