adriancarriger / angularfire2-offline

🔌 A simple wrapper for AngularFire2 to read and write to Firebase while offline, even after a complete refresh.
https://angularfire2-offline.firebaseapp.com/
MIT License
207 stars 48 forks source link

We are Lookforward to including sqlite in ionic 2 angularfireOffline! #3

Open aboessa opened 7 years ago

aboessa commented 7 years ago

Hi , First thank you for this awosome work , but the package use localstorage which have many problem an differ platfroms such as android which is have 5 mb disk limit , and in ios the data can be deleted on any time refer to : https://cordova.apache.org/docs/en/4.0.0/cordova/storage/storage.html If The Package Author Or Any experience one can contribute it with this feature, again thank you for this good work.

adriancarriger commented 7 years ago

Using SQLite would be a nice feature for native Ionic 2 projects because it would allow more offline storage. There would need to be a fallback on local storage if the Ionic project was also being used as a progressive web app.

This library looks promising: https://github.com/litehelpers/Cordova-sqlite-storage

Anyone interested is welcome to contribute to this feature.

nivida commented 7 years ago

Oh we have the same problem right now.. Maybe we creating an AngularOffline Wrapper with SQLite . @aboessa have you already began on an angularFire2Offline Wrapper with SQLite?

DennisSmolek commented 7 years ago

With the usage of localForage doesn't it only use localStorage as a fallback? From my understanding it will first try for IndexDB, then WebSQL, then default to localStorage. According to the cordova storage docs the first two should cover most install types..

You could always use custom drivers too

adriancarriger commented 7 years ago

@DennisSmolek you're totally right, it does use localStorage as a fallback. I like the custom drivers option! Perhaps using the Cordova SQLite Driver when AngularFire2 Offline is being used with Cordova would be a nice option to avoid the browser storage limits.

larssn commented 7 years ago

You could simply use Ionic's storage module? Works both in browsers and on devices. Would require very little effort to implement.

ciekawy commented 7 years ago

@larssn actually ionic-storage modules uses localforage as angularfire2-offline and it is possible to configure the backend having same options, just ionic-storage includes Cordova SQLite integration.

iturn commented 7 years ago

Indeed amazing work here and very well documented! Thanks.

adriancarriger commented 7 years ago

@iturn Thanks!

monad98 commented 7 years ago

Thanks for this great work. Any update on this?

Ross-Rawlins commented 7 years ago

hey guys I just moved over from using azure offline sync with cordova which is a total load or rubbish, just want to see hows this coming along?

myrsk commented 6 years ago

Any updates on this? :)