Android Question FMC or Database?

karld

Active Member
Licensed User
Longtime User
I am mulling over the best way to proceed here.

I have an app I am writing for a company that has fueling stations.
They want to be able to update fuel prices in the app.

I have been trying to figure out the best way to do this.
I have been looking at MySQL database, Firebase database, XML download, FMC message, etc.

Right now I am leaning towards using FMC message to trigger a download from Firebase storage of an xml file.
They will only do one or two updates a day.

I already know how to download and parse in the XML file as I am doing that for a different app.

Any thought? Pros? Cons?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
What do you mean with FMC? Firebase push message (FCM)?

Push messages are not replacement for an online server. You should assume that some of the messages will be lost.
If it is good enough to update the prices when the app starts then you don't need push messages at all.

Can you use an online server? If so then consider using jRDC2 with MySQL or any other database.
 
Upvote 0

Widget

Well-Known Member
Licensed User
Longtime User
Upvote 0

udg

Expert
Licensed User
Longtime User
If you know in advance the time of the day when an update should occur, you could use StartServiceAt and read new data from a DB.
That applies even if each day you have different times: just read at day start a list of "update times" and then make use of the above.

udg
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
FCM is used for "realtime" messages (like a notification in WhatsApp). If you need to update x times/period, follow UDG's hints and do it time scheduled. If you have "millions" of devices, add some random time on it (to prevent all devices calling the server at the same time).
 
Upvote 0
Top