Android Question FireBase Storage vs FireBase RealTime Database

trepdas

Active Member
Licensed User
The idea of having a text file in storage instead of using a database is probably a downgrade, however, at my stage it is fascinating and get me learning more until the firebase realtime databse will be more accessible for b4a.

So , I will create a text file "MyAppSQL.txt" and make it to use.

In my project, all app users can read the file and authenticated firebase users will be able to modify the file.
so I do need it to be as close to real time as possible.

(I need all app users to be able to read the most updated file in storage).

I didn't try anything yet, and my question would be theoretically speaking -

any idea how to "force download" the file to all users when an authenticated user modify it ?

if I implement a firebase messaging system (displaying status state etc) - will this work in updating the file to all?
if so, I can compinsate with this instead of the realtime database....


my second option would be to force login all app users...
 

DonManfred

Expert
Licensed User
Longtime User
will this work in updating the file to all?
No. Firebasemessaging only sends Text respetively the payload is around 4k max...
But getting a Push notification can force your app to download a specific file from the storage.
 
Upvote 0

BillMeyer

Well-Known Member
Licensed User
Longtime User
Have you had a look a this: https://www.b4x.com/android/forum/threads/b4x-cloudkvs-synchronized-key-value-store.63536/

If you have the facility that you need to implement this, it works brilliantly and will address most if not all your needs.

Take a careful look at the code and how this server works. Several of your ideas are addressed in this tutorial. Personally (an untested theory) I feel that an App user will start doubting your app if you are running several updates over a period of time, so your most ideal situation would be to place an app on the store which is properly and then try as far as possible to do updates etc from a back-end server.

Another alternative is to build on @DonManfreds post above by using PN's or even using one of the MQTT principles - as the English would say "It's Horses for Courses" - read your environment, choose a strategy, then choose the correct tools and build your solution.

Enjoy !!
 
Upvote 0

trepdas

Active Member
Licensed User
No. Firebasemessaging only sends Text respetively the payload is around 4k max...
But getting a Push notification can force your app to download a specific file from the storage.

Thank you for this Push notification idea. I'll test it out.
 
Upvote 0

trepdas

Active Member
Licensed User
Have you had a look a this: https://www.b4x.com/android/forum/threads/b4x-cloudkvs-synchronized-key-value-store.63536/

If you have the facility that you need to implement this, it works brilliantly and will address most if not all your needs.

Take a careful look at the code and how this server works. Several of your ideas are addressed in this tutorial. Personally (an untested theory) I feel that an App user will start doubting your app if you are running several updates over a period of time, so your most ideal situation would be to place an app on the store which is properly and then try as far as possible to do updates etc from a back-end server.

Another alternative is to build on @DonManfreds post above by using PN's or even using one of the MQTT principles - as the English would say "It's Horses for Courses" - read your environment, choose a strategy, then choose the correct tools and build your solution.

Enjoy !!

I went through it.
basically it is perfect for my project's needs.
I'll play around with it.
Thank you
 
Last edited:
Upvote 0
Top