system.CachesDirectory and building for android

Hi I am currently making an app for a school project. I have a number of JSON files in the system.CachesDirectory and they need to be included when I build the app for android. I need to update the files regularly and also download replacement files from the internet. This is why I chose not to use the system.documentsDirectory. My question is how can I make sure the JSON files are included in the built version of my app that I put on my phone?

Sorry if this is a stupid question I am new to corona.

Thank you very much for your help.

You need to put them there yourself.  Corona builds ONLY copy the contents of the resource folder for you.

Easiest way:

  • zip them all up in a single file.
  • copy that zip file to your root folder (same folder as main.lua)
  • write code in the app to unzip that file to whatever folder you want the files to be in.
  • build the app
  • when the user runs the app.  Viola.  Unzip… ready to go.

This worked. Thank you very much for your reply!

You need to put them there yourself.  Corona builds ONLY copy the contents of the resource folder for you.

Easiest way:

  • zip them all up in a single file.
  • copy that zip file to your root folder (same folder as main.lua)
  • write code in the app to unzip that file to whatever folder you want the files to be in.
  • build the app
  • when the user runs the app.  Viola.  Unzip… ready to go.

This worked. Thank you very much for your reply!