i want to download a png file into my installed app and save it there(not necessarily in the app installation folder…i don’t care where the file is saved as long it is on the device). now, i want to know if the following is the process for doing that:
- we need to use hot update.
- an older version of the file should already be present in the app.
- we need to unzip the earlier version of the apk and locate the png in the raw-assets folder(this step is too painstakingly long and time-consuming).
- we then need to upload a newer version of the png to our server.
- if the server entry of the png in the assets manifest is greater than the client entry then download the file.
- restart the app.
what is problematic here is that an older version of the file needs to be present already in the apk(a new file can’t be downloaded). also it is very time-consuming to locate the file in the raw-assets folder.
now, alternately, i can successfully download a png using cc.loader.load , but i am unable to save the file on the device using jsb.saveImageData.
can someone please tell me what the correct way to download and save a png is? and could you please provide a working example if possible?