Page 1 of 1

Android Tester is storing files in different location than compiled app

Posted: Wed Mar 23, 2016 12:24 pm
by Miguel Navarro7469744

fileSys.root is different in tester vs exported apk. I'm using v 3.0 libraries.

In the exported apk I'm getting the app sandbox

window.requestFileSystem(LocalFileSystem.PERSISTENT, 510241024, function(fileSys) {
fileSys.root.getDirectory(path,{create:false}...

Why would this be different in the tester? I actually prefer the way it's being stored in the tester because it's public and the user can access the files if there's a problem.


Android Tester is storing files in different location than compiled app

Posted: Wed Mar 23, 2016 5:32 pm
by Miguel Navarro7469744

I have done a little more research on this and to get to get to the externalDirectories you have to do something like:

window.resolveLocalFileSystemURL(cordova.file.externalRootDirectory...
instead of
window.requestFileSystem

The tester app errors on window.resolveLocalFileSystemURL this, but the compiled app does fine.

It looks like the tester app itself needs to be upgraded to the more current version of the plugin?

I hate having differences between the tester app and the build as it makes testing more difficult.


Android Tester is storing files in different location than compiled app

Posted: Wed Mar 23, 2016 6:25 pm
by Miguel Navarro7469744

Ok, I fixed this by going to the Setting/Application Manager/ Appery.io and removing all the data/cache. I reloaded the app and it was working correctly in the sense in that window.resolveLocalFileSystemURL was working. Now I can refactor window.requestFileSystem to window.resolveLocalFileSystemURL without having to worry about having differences between the tester and the app compiled.

But despite this and not sure why the window.requestFileSystem(LocalFileSystem.PERSISTENT

are different in the tester vs the app.


Android Tester is storing files in different location than compiled app

Posted: Wed Mar 23, 2016 7:27 pm
by Serhii Kulibaba

Hello Miguel,

You are right, it works only for native apps.