In my PhoneGap + Wikitude app, I have PhoneGap's standard index.html and index.js files which launch my Wikitude world myWorld.html.
In myWorld.html, I need the fileSystem and a FileTransfer. I have put a correct reference to the PhoneGap JavaScript file in myWorld.html.
<script type="text/javascript" src="../../../www/cordova-2.5.0.js"></script>
I am trying these two calls without any luck:
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, fsSuccess, fsFail);
var ft = new FileTransfer();
I am aware of WikitudePlugin.callJavascript()
(see this question as well) to call Javascript in the Wikitude world from within PhoneGap but:
- I understand that using
callJavascript()
, I can only pass textual parameters to my Wikitude world. - Surely there MUST be a way to call PhoneGap functionality from within a Wikitude world HTML as cordova.js is nothing but a JavaScript file?
How can I obtain a reference to the fileSystem and a FileTransfer object in my Wikitude world?