Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3215E10804 for ; Mon, 26 May 2014 21:04:02 +0000 (UTC) Received: (qmail 12011 invoked by uid 500); 26 May 2014 21:04:01 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 11984 invoked by uid 500); 26 May 2014 21:04:01 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 11975 invoked by uid 99); 26 May 2014 21:04:01 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 May 2014 21:04:01 +0000 Date: Mon, 26 May 2014 21:04:01 +0000 (UTC) From: =?utf-8?Q?Frederico_Costa_Galv=C3=A3o_=28JIRA=29?= To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-6048) Add config setting for Android app launchMode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-6048?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1400907= 8#comment-14009078 ]=20 Frederico Costa Galv=C3=A3o commented on CB-6048: -------------------------------------------- This doesn't seem to be documented anywhere I could find. Furthermore, even though upgrading to cordova 3.5.0 from 3.4.1 adds =20 {code:xml} {code} to both *platforms/android/cordova/defaults.xml* and *platforms/android/re= s/xml/config.xml*, it doesn't modify the final AndroidManifest with=20 {code} android:launchMode=3D"singleTop" {code} Maybe that's to be included in the documentation, or maybe it should defaul= t to that even if the root *config.xml* doesn't specify that setting. And as a bonus, I couldn't find the correct reasoning behind this other tha= n very old behaviour reported on stackoverflow and phonegap-build forum fro= m at least a year ago where the app would restart if clicked on the app ico= n instead of resuming. Has there been something else that made this change = be needed? > 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 needs: android:launchMode=3D"single= Top" -- can I add it? > Quick search brings up: http://stackoverflow.com/questions/10122449/phone= gap-android-application-restarting-instead-of-resuming-although-it-was-not > ..which advises to add android:launchMode=3D"singleTask" to AndroidManife= st.xml , which does fix the issue. > According to the descriptions in http://developer.android.com/guide/topic= s/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 is= sue, and according to the description, sounds to me like a much better defa= ult." -- This message was sent by Atlassian JIRA (v6.2#6252)