Miguel Navarro7469744
Posts: 0
Joined: Mon Apr 06, 2015 4:55 pm

Android Tester is storing files in different location than compiled app

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.

Miguel Navarro7469744
Posts: 0
Joined: Mon Apr 06, 2015 4:55 pm

Android Tester is storing files in different location than compiled app

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.

Miguel Navarro7469744
Posts: 0
Joined: Mon Apr 06, 2015 4:55 pm

Android Tester is storing files in different location than compiled app

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.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Android Tester is storing files in different location than compiled app

Hello Miguel,

You are right, it works only for native apps.

Return to “Issues”