Cordova / Phonegap下载大量图像,尽可能最佳的解决方案 [英] Cordova / Phonegap downloading a lot of images, best possible solution
问题描述
我有使用Ionic框架创建的Phonegap / Cordova内容应用程序。
这个应用程序可以在线和线上工作。
到目前为止,我设法实现了脱机数据库(SQLite),但是我对图像有些麻烦。
我选择的第一个策略是在应用程序第一次启动开始时安装所有图像(同时进度条可见)
它的工作原理,但我认为应用程序的第一次启动太慢了(超过800张图像)
需要超过7分钟,这对用户体验来说真的很糟糕。 / p>
以下是我的一些策略:
-
下载所有图片作为单个ZIP文件并将其解压缩到设备中
-
仅下载部分图像(25%?),然后在后台下载其余部分,而用户可以使用他的应用程序在某些地方使用某种图像占位符?
哪种策略是最好的?
也许有人有类似的经历?
用于保存遥控器的离子/角度指令图像到本地文件存储。可能能够帮助你。确保遵循readMe.md文件。
I need some advice. I have Phonegap / Cordova content app created using Ionic Framework. This app is supose to work both offline and online.
So far I managed to implement offline database (SQLite), but I have some trouble with images.
The first strategy I chose was to "install" all the images at the beginning of first start of app (in meanwhile Progress Bar was visible)
It works, but I think that first start of app is simply too slow (it's over 800 images) It takes more than 7 minutes, which is really bad for user experience.
Here are some of my strategies:
Download all the images as single ZIP file and extract it into device
Download only some part of images (25% ?) and then download rest of them in the background, while user can use his app. Use some kind of images placeholder at some places ?
Which strategy is the best ? Maybe someone has similar experience ?
An Ionic/Angular directive for saving remote images to local file storage. Might be able to help you out. Make sure to follow the readMe.md file.
这篇关于Cordova / Phonegap下载大量图像,尽可能最佳的解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!