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 CF4071040F for ; Fri, 30 May 2014 13:53:01 +0000 (UTC) Received: (qmail 75000 invoked by uid 500); 30 May 2014 13:53:01 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 74977 invoked by uid 500); 30 May 2014 13:53: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 74968 invoked by uid 99); 30 May 2014 13:53:01 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 May 2014 13:53:01 +0000 Date: Fri, 30 May 2014 13:53:01 +0000 (UTC) From: "Ian Clelland (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-6667) window.requestFileSystem - callbacks are not fired in a particular circumstance MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-6667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14013634#comment-14013634 ] Ian Clelland commented on CB-6667: ---------------------------------- Thanks -- I'll test it out. Incidentally, do you know what versions of Cordova and the File plugin you are using? > window.requestFileSystem - callbacks are not fired in a particular circumstance > ------------------------------------------------------------------------------- > > Key: CB-6667 > URL: https://issues.apache.org/jira/browse/CB-6667 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin File > Affects Versions: 3.4.0 > Environment: Mac OS X 10.9.2 > Android SDK (latest) - API v19 > Eclipse 4.2.2 > Reporter: Kelvin Dart > Priority: Critical > Labels: Android4.4.x, Cordova, androidmanifest.xml, window > > Excuse the essay, but I have a very odd issue that I have singled down to Cordova which happens in a very specific circumstance on Android. > I have provided a project of the stock Cordova Android project which can be found here: http://www.filedropper.com/windowfstest - with a minor modification for the issue I am having. > I have uploaded a compiled APK to install to your device here: http://www.filedropper.com/windowfstest140509-1404 > Steps to replicate are: > 1) Download and install that APK onto your device (I was using the Samsung Galaxy S4 with Android 4.4.2 running, no root, and stock TouchWiz ROM, I *hope* this occurs on other Android devices but have not had an opportunity to verify). > 2) Start the application and observe an alert appears stating 'dr', then afterwards another alert appears, 'got FS' - if you check the code, you'll see this is normal from my app.initialize(). > 3) Once those two alerts have appeared, press the Android 'home' button, to quit to the main Android home screen. > 4) Go into another app or two and just use your phone normally. What we are trying to achieve here is for the Android memory management system to 'end'/kill the WindowFSTest app in the backend. > 5) Go into Apps > WindowFSTest (i.e. the app in question) and hopefully it will have restarted - the app has to have restarted for the bug to occur, and observe a few things here: > a) Verify the app has restarted, this can be verified by the 'dr' popup occuring when Cordova loads. > b) Once you are confident the app has been restarted, observe the initial 'dr' popup, but *not* the 'got FS' popup - this is the bug, the window.requestFileSystem does not fire the callbacks for some reason - and I do not know why. > N.b. there are a few things to note here which is why the bug is tricky to replicate AND I imagine will be even more difficult to debug at a lower level ;-) > 1) The Android system has to kill the app in the backend once you've pressed the 'home' button - there's no way of determining when this has happened, just use the phone like ordinary for half a minute or so - normally it kills it after a short period. > 2) The way to restart the app is via Apps > WindowFSTest (not via the task manager). > 3) ***IMPORTANT*** the above two steps seem to occur only when you run it from a compiled APK, not directly from source/debug APK - so it's not as easy to debug since you cannot put line breaks in the Java file(s). > Although not perfect, one way to fix this is to use: > android:launchMode="singleTop" > In AndroidManifest.xml - since it ensures the app is 'resumed' instead of restarted. > I can provide a video upon request illustrating the issue. -- This message was sent by Atlassian JIRA (v6.2#6252)