开发者

Save images phonegap query iOS (url in xml)

开发者 https://www.devze.com 2023-04-03 01:45 出处:网络
I\'m sort of stuck with a iOS / phonegap question. I have a XML on the server which I download successful with ajax. I even save the XML in the local storage and can read it l开发者_如何学编程ater wh

I'm sort of stuck with a iOS / phonegap question.

I have a XML on the server which I download successful with ajax. I even save the XML in the local storage and can read it l开发者_如何学编程ater when offline. The next step is the one where i need a startup. Within the XML I've got image URLs. I would like to download them and save them locally.

What is best practice and also the quickest way? Do i need the FileWriter plugin for that? Or do i need to save them in a database as base64? And after that how can i read them to show in the application?

Thanks in advance


There is no simple way as far as i can tell. You may wish to try using the cache manifest, or downloading them using code such as this: http://blog.clearlyinnovative.com/post/2056122828/phonegap-plugin-for-downloading-url-all-the-code

Full project here: https://github.com/aaronksaunders/FileDownLoadApp

Good luck

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号