Cordova/Phonegap/Ionic App - local store of remote images Cordova/Phonegap/Ionic App - local store of remote images json json

Cordova/Phonegap/Ionic App - local store of remote images


Solution 1

Use $cordovaFile service from ngCordova - http://ngcordova.com/docs/ (looks like you will need downloadFile method of this service)

Solution 2

Use this Cordova plugin - https://github.com/apache/cordova-plugin-file/blob/master/doc/index.md (This plugin implements a File API allowing read/write access to files residing on the device.)

Essentially, solution 1 is just a Angular wrapper for this File API.

Solution 3

Store images in Local Storage, but it's very limited due to you have size limit of like 5 Mb. Also storing images in storage like this is generally bad idea.

Solution 4

Use WebSQL as alternative to Local Storage.


I personally would go with solution 1.