Reputation: 1
I have just started learning cordova. I want to know how to save something in Internal Storage. Which plugin and code should I use? Please help me. And if you have a demo project, please give it?
Upvotes: -2
Views: 1578
Reputation: 2947
Not sure what's meant by internal storage -- I'm guessing something permanently on the device?
Cordova is not very prescriptive in where you should store your data, and that's kind of on purpose (if you listen to some of the videos, its original goal was to not be needed, once web apps became functional enough). That said, there's an article on the Cordova site that describes pros and cons of the various places you can store things with Cordova / javascript / plugins: https://cordova.apache.org/docs/en/10.x/cordova/storage/storage.html
On my app (https://github.com/adapt-it/adapt-it-mobile if you're interested in poking around), I use a combination of places to store things:
Upvotes: 0
Reputation: 634
You need to use cordova-file-plugin. This plugin can be used to access, read and write file. Check here - https://cordova.apache.org/docs/en/10.x/reference/cordova-plugin-file/index.html
You can also find sample examples for Create Files and Directories, Write, Read, and Append files
Upvotes: 0