Firebase or SQLite or both for ionic!

Hello guys,

Im going to develop an application that need to store some data for some services, my question which i should use to make my application more usebilty. Should I use firebase or SQLite or I can use both easly ?

& is firebase already support offline mode, I mean all data will be uploaded automaticaly if the connection back or not ?

You need to manually activate offline/online mode

1 Like

Thanks for ur answer
Do u mean firebase support offline/online mode ?

If ur answer yes, can u give me a link that may help me in this point ?

Yes, please check the official documentation https://firebase.google.com/docs/reference/js/firebase.database.Database#goOffline

1 Like

Do you actually need the data to be uploaded to a server? Otherwise check out Ionic Storage, it doesn’t get easier than that.

1 Like

This offline does not mean persistent, it wouldn’t survive an app restart. And disk persistence is only available in the firebase native libs.

If you need persistent storage, then you either build a native app with firebase or use Ionic storage. You will then land up in bigger problems when you use service/provider components to talk to firebase…and those won’t auto refresh the UI…for which then you’ll need to use changeDetection…best of luck :slight_smile:

2 Likes

There is angularfire2-offline:

A simple wrapper for AngularFire2 to read and write to Firebase while offline, even after a complete refresh.

1 Like

I recommend Angularfire2 absolutely. You have real time db and offline conexion, you have to set up these. And it works great with Ionic.

1 Like

yes i think that also, thank u all of u guys

Glad to help! And if you need some help with the configuration or something just ask me. Im using it on my app, i have a list with items and the update its just a:

item[X].update(firebaseKey, data)

The offline part im not using that but i can try help you anyways.

:slight_smile: :slight_smile:

1 Like