[
https://issues.apache.org/jira/browse/CB-6047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13904164#comment-13904164
]
Ian Clelland commented on CB-6047:
----------------------------------
Hi Robin,
Hard to say if that's the same problem; the File plugin may have changed
significantly since that question was posted. What version of the File plugin
are you using right now?
Also, do you have a minimal test case that reproduces this problem?
It's possible that this is an issue with the native side of the File plugin not
being initialized on startup. As a troubleshooting step, you could try changing
this section of your project's {{res/xml/config.xml}} from this:
{code}
<feature name="File">
<param name="android-package" value="org.apache.cordova.file.FileUtils" />
</feature>
{code}
to look like this:
{code}
<feature name="File">
<param name="android-package" value="org.apache.cordova.file.FileUtils" />
<param name="onload" value="true" />
</feature>
{code}
And see if that changes things; see if you get the callback the first time
through.
> File plugin callback problem with android 4.4 kitkat
> ----------------------------------------------------
>
> Key: CB-6047
> URL: https://issues.apache.org/jira/browse/CB-6047
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 3.3.0
> Environment: Android 4.4
> dev windows
> IDE Eclipse
> Cordova 3.3
> Reporter: *robin
> Assignee: Ian Clelland
>
> I've try to use the file plugin on my android phone in 4.4 but I've got some
> strange problem with the callback function, succeed or fail.
> When I try to access fileSystem (window.requestFileSystem)
> The first time I don't receive the callback. But If I try a second time I've
> got 2 callBack.
> I've try to debug the case. I 've figure that the 2 thread executing in java
> (JavaBind and file plugin) are synchronise on the NativeToJsMessageQueue.
> When the plugin enqueue Message and the java bind pop Message.
> But I think the javabind finished before the file plugin, and never see the
> message in the queue. But the second time, I've got the 2 messages.
> I think this is the same problem describe here :
> http://stackoverflow.com/questions/20821536/phonegap-cordova-deviceready-or-requestfilesystem-not-working-android
> Thx
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)