I am working on an app with a special requirement - the app works offline and has "sync" mechanism. That means that on demand, the user can sync the app with the servers. I implemented a process that using cordova's 'FileTransfer' and node generates a json file with the most recent data, and downloads it to the local file system. Now, I naively thought that I could just fetch the data using a stabndard htrp rquest to this file. But It did not work. So I examined the logcat of my device and found that it is not possible to execute http requests to 'file://' protocol. While writing these lines it actualy makes sense.
Then how can I do that anyway? How can I fetch a file on the file system? Is there a way to fake a service that runs on the device or somwethibf?
Thanks!