cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Morgan Allen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-6667) window.requestFileSystem - callbacks are not fired in a particular circumstance
Date Tue, 24 Nov 2015 21:00:12 GMT

    [ https://issues.apache.org/jira/browse/CB-6667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15025392#comment-15025392
] 

Morgan Allen commented on CB-6667:
----------------------------------

Try also using the Network Information plugin. I believe the problem has to
do with the File Plugin trying to use a network online/offline event to
signal a file read. Which only works if you are not actually listening for
that event.





-- 
http://ithoughtyouweretherobot.com
Metal and Wire

http://nolonelyguineapigs.com/
Wandering and Rambling

http://morglog.org
Old and Neglected.

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: OpenPGP.js v.1.20121007
Comment: http://openpgpjs.org

xsBNBFG3btUBB/9+/WJNOSIuc/praKPaPOweqXV5s7PGRD+HAnNWF/19YAY3
AFtfeoelhhY4sMJoobTaJzcZojznZ1kl/7UuuYCnbJO3Z9kaSMVrVxEZMSLe
YmW8Hc4ZsTnl9f05DQFy8ABpAvMLmXJQXh63BbfzjFqNbSWQfLhrubSM2Elq
xmN6EsmRyAuEeYlSnal+Di2MlViohpCbbagE2D6AZTUECIamTib6+DuLG4XO
b4GGKHR9TXu2qS1VH6hqcvdEz2MDE5OqZzAnBgcF2dvcOdTk9gAOoR1T+qKj
IJtg2X0ETbxcPqEXQoXE8VrxN0MLT5JQKTg26+csU4P2w0rEWsUsJombABEB
AAHNJU1vcmdhbiBBbGxlbiA8bW9yZ2FucmFsbGVuQGdtYWlsLmNvbT7CwFwE
EAECABAFAlG3btwJEG9pFLKaVEfeAAD7hwf+K8LN/kfgi8GTRLiTcuM+hSbm
uAeiBY+VaJIQFLzoFlt8A0hBlLNPFNNmUDxdPrMErdHgZ7HtJW/6RANuBTti
5hr3EBguH1GQyK7BbUqJGvaEX4UNRej3uyX3ufXDsIB/3NsKaTyyu+SO0+Hv
Cn2DwmlfSXcPhoarx6Turizn/WwgtTN3tqrMWxxiCKWydLH5xYuz+23BLMdc
oF/zkbF+7ddFhmyfiFh4Ej9//tsfwPj2cACU3uLTrcwCo7IxUtkrqMF/fhlm
LEqjhzDDjq9v7GNWb/5xB2xgTaucJ7/ljuS8nPlZqwCI8NlTgSqC8nyVLyjS
yVtOzkItcS0UqyW1Mg==
=V/Ia
-----END PGP PUBLIC KEY BLOCK-----


> 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
>            Assignee: Joe Bowser
>            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.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message