问题
I am now developing Apps using IBM worklight 6.2, and for offline usage, my app need to download all the demo data from the server, may I ask:
how can I save files(like .png, .mp3, .ppt) in the app when online and show for offline usage ? can I direct use JSONStore to do so ? or any other local storage method ? by the way, I need to develop it both in IOS and Android.
回答1:
Best solution would be to follow the training modules and documentation for JSONStore and use it to store any file you want.
See more information here:
- Worklight - Working Offline
- JSONStore user documentation
Otherwise, you can implement Cordova File API. But, JSONStore is more built-in...
- https://github.com/apache/cordova-plugin-file-transfer/blob/master/doc/index.md
- https://github.com/apache/cordova-plugin-file/blob/master/doc/index.md
来源:https://stackoverflow.com/questions/24860943/ibm-worklight-6-2-how-to-save-files-in-the-app