问题
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