user1165474
user1165474

Reputation: 175

Phonegap - jQuery Mobile - Download/Save/Load File

I'm using Phonegap with jQuery Mobile and have the following use-case:

What's the recommended way to do that?

Or is there any better way?

Upvotes: 4

Views: 1649

Answers (1)

Simon MacDonald
Simon MacDonald

Reputation: 23273

  • Use XHR to download the JSON data.
  • Use the FileWriter to save the file to the file system.
  • Use the FileReader or XHR to read the JSON file from the file system.

No, you cannot save the file to assets/www as it is not writeable.

Upvotes: 1

Related Questions