Downloading and saving files with AIR for iOs

独自空忆成欢 提交于 2019-12-25 02:25:14

问题


For a project we need to download and save pdf files on an IPAD device for offline use through an AIR for iOs application. After a lot of searching I haven't found much information on this subject. My question is, can it be done, and if so, can you provide us with some pointers to lead us in the right direction.

Thanks for your time!


回答1:


Sure, first you check if you can access the web - can use a class like air.net.URLMonitor, if you can you can set up a URLStream instance.

You get data while its downloading the file using the progress event, write that out to a File instance using the FileStream class.

To display the PDF file you can use a StageWebView or HTMLLoader.



来源:https://stackoverflow.com/questions/7040011/downloading-and-saving-files-with-air-for-ios

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