How to properly setup firebase refresh remote config time


(Kimi Paniz) #1

Hello guys. I’ve just started using firebase and I wanted to make an app for my store with promotions (like free apps for a limited time).
I wanted to do so using a label and firebase remote config.
When the app starts, the label should be refresh its data.
On first start it gets the data and if I go to settings and clear app cache and data, it also gets updated but when I exit and relaunch the app, the data doesn’t get modified after I modified the value in firebase settings. Also a refresh button that I’ve added doesn’t work.
I think is a cache problem but idk how the number works. I’ve tried setting the cache number from the default to 1 but it still don’t solve the issue.
How does this number work?
If I put 1, will the cache expire in 1sec? 1minute? 1hour?
How does this number work?

(Cian) #2

Are you using TinyDB as well?

What I do, is I have a “GetSubsbcription” proceedure.

it checks the version (which allows me to shut down a version for everyone)
it checks subscription level
It checks the values for the subscription
tt check the expiration date.

This all based on ensuring that the relevant data is NOT stored locally. I do not use TinyDB for any data that needs to be online.

Make sure you have a proper routine kicking off at startup checking firebase. So make sure you have a proper GET procedure to check Firebase for updates.

(Kimi Paniz) #3

No, I’m not using tiny db.
If you want to give a look at the code, here’s the aia file Lite_Tools_promotions.aia (17.2 KB)

You will understand more than me for sure

(Cian) #4

You are using remote config. Is there a reason and not just a realtime DB?

(Kimi Paniz) #5

Well, I’ve just started using online features on my apps so I don’t know much about all these things.
I’ve noticed that firebase component and tought that it was perfect for the use that I need.
Btw now I think that this is a cache problem and not a connection or a setup issue if I wait some time (idk exactly how much) and I open the app, it gets update.
So how do I use the cache setup?
If I put 1 after how much time will cache expire?

(Franck G) #6

I have the same problem as you do.
The cache is in ms, so by default it’s 43 seconds, which shouldn’t take hours to update.
EDIT : I give up, firebase remote config has too much problems, i will use database instead

(Philipp Lang) #7

As the team told at the update it could be that the new firebase feature have may some tiny problems which will be solved with the next updates.
Stay tuned.

(Franck G) #8

Ok thanks ! I will use Firebase DB for the moment