Firebase or SQLite [closed]

2020-03-26 07:34发布

I am new to android development and I am currently developing an application using SQLite as my database. The problem is, I want to share information across other people using the application. As far as I can tell, using SQLite alone will only allow me to store user information locally. Is there a way to sync all data for each user using SQLite, or is Firebase the option to if you want to share data with everyone using the app? Or is there a better option that you recommend?

3条回答
甜甜的少女心
2楼-- · 2020-03-26 07:42

Firebase is the solution, as it helps you to secure messaging operations (push notifications), to report crashes and to sync data in realtime (milliseconds).

A SQLite database is a simple file stored locally on your device. Firebase can host it on a server to make it global, accessible by anyone.

查看更多
等我变得足够好
3楼-- · 2020-03-26 07:52

A few things.

1) Firebase is free unless your app takes off and you have a lot of users making calls to their APIs.

2) Firebase is a lot more than just for push notifications.

SQLite is great. Its basically firebase, right on your device (minus the things Firebase offers (their service). HOWEVER, if I drop and break my phone, the information that is store in the SQLite database dies with my phone. That is a big no-no.

Firebase/Parse-Server are very alike. I use Parse-Server because I developed with Parse before Facebook dumped it. However, Firebase makes your job a lot easier. You can write a pretty in depth CRUD system in a day and then just build off of it. You can store information locally on the machine (cache). You can easily set up push notifications, however I like One Signal.

If I was starting out and I had that same question, I would go Firebase. You do not have to worry about writing code for the SELECT and queries. Firebase does it all. If you update anything through the dashboard, the application will update in real time too. Its pretty great.

查看更多
我命由我不由天
4楼-- · 2020-03-26 08:05

It depends on how you want to utilize your data across the apps, you can have a sperate backend for storing data or/and you can use Firebase Database for the same.

Keep in mind that Firebase Database is PAID

查看更多
登录 后发表回答