IBM worklight 6.2 - how to save files in the app?

∥☆過路亽.° 提交于 2019-12-13 09:04:41

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!