In project's www folder I have app.xml file with some data deserialized during application start. I use jQuery GET to read settings like in example:
The issue begins with trying to serialize new data back to the file. The simplest way is to use POST method (I tried also XMLHttpRequest and FileWriter):
When i run this function, console responds with some kind of access problem (while get works fine):
POST http://192.168.1.11:3000/app.xml 404 (Not Found) send @ jquery-2.1.4.js:8630ajax
I've read about similar problems, the solution was always cordova whitelist plugin. In my case it did not work, neither in browser, nor in android app.
<plugin name="cordova-plugin-whitelist" source="npm" spec="~1.2.1"/>
<allow-intent href="*" />
<allow-navigation href="*" />
It looks to me that I miss some data write privileges, but it's weird to me, that it doesn't work even in browser. How should I properly store program settings?
You are not allowed to write back into that directory. You can look at using the File plugin to write to the allowable directory, or look a solution like Local Storage for you settings.