Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Giovanni_S_
Beginner
240 Views

cordova - save file into app sandbox

Hi,

I' would like to save files into the app sandbox using Cordova Api.

I tried to use:

window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fileSystem){ gotFS(fileSystem}, fail); 

 

function gotFS(fileSystem)

{

var entry=fileSystem.root;

}

But I discovered the "entry" variable points to public External Storage in Android, possible? where does the error came up?

And in iOS environment how i can save files persistently in app sandbox?

Thanks in advance!

 

 

 

Tags (2)
0 Kudos
4 Replies
Elroy_A_Intel
Employee
240 Views

I recommend that you consider the plugin-based storage options recommended by Apache Cordova at https://cordova.apache.org/docs/en/latest/cordova/storage/storage.html#plugin-based-options.

Giovanni_S_
Beginner
240 Views

Hi Elroy,
thanks for your reply,
i looked at the link you suggested me, but it seems to be useful for saving data into DB, not files.
My goal is to persistently save files into the app sandbox.

Is there any possibility?

Thanks

Thomas_B_6
New Contributor I
239 Views

 

Hi Elroy,

hjust use the Sqlite Plugin, if you want to store data into a database.

Well documented and works well with the XDK.

Best

Tom

Elroy_A_Intel
Employee
239 Views

I agree SQLite is a good database storage option for locally storing data in your app for persistence.

Reply