how can i select the files that i want to update through hot update? for e.g. if i know that a certain file will never change and i don’t want to list it in the project manifest, how can i do that? i actually have a large project where i can’t simply go through the res folder and check each file. so what is the solution?
Modify the version_generator.js to include/exclude paths based on your demand. If an given script is not on the manifest file, but is in the base APK, it will work.
What Hot Update really does is more or less like that:
- In the first hotupdate, create a temp folder
- Download the diff between the local manifest and remote, but not touch in the local files
- All new files goes in temp folder (scripts included)
- Add this temp folder path in search paths as highest priority
- When searching for an script/asset, look there first
- Not found? Search the base.
- Not found? Asset not found.
- Second hotupdate and beyond:
- rsync the temp folder, adding, editing and removing it’s files.
So, if you ignore an file in the manifest but it is in the base APK, it will work. If you always version this file, but the file doesn’t change, it will work.