I have attached the code I have used
This is NOT the correct way. What if I would like to try the project to help?
Do you really expect me to create a new project from it (from the PDF)??
If you want to show the project using then you should use File->Export as zip from the IDE and upload this ZIP here.
Another way is to use the code tags and posting all relevant code
This time i´ll not ignore this request
Do you have configured RemoteConfig in Firebase correctly?
b] if I wanted to load several values from Firebase at the same time how can that be achieved?
Add more Values in the config...
Note that you TTL value is relevant.
You´ll get new values after the time is over. to test you can use 0 but that is not the expected value...
With a ttl of 0 you always request online values.
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
cfg.Initialize("Config")
cfg.Defaults(CreateMap("promo_code": "", "loading_phrase": "Hallo world!"))
Log("loading_phrase="&cfg.getString("loading_phrase"))
Log("promo_code="&cfg.getString("promo_code"))
Log("Fetching")
cfg.fetch(0)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Config_onFetchComplete(success As Boolean)
Log($"Config_onFetchComplete(${success})"$)
If success Then
Log("Activate fetched values")
cfg.activateFetched
Log("loading_phrase="&cfg.getString("loading_phrase"))
Dim info As RemoteConfigValue = cfg.getValue("loading_phrase")
Log($"Loading phrase info: Source ${info.Source}, ${info.asString}"$)
Dim info As RemoteConfigValue = cfg.getValue("promo_code")
Log($"Promocode info: Source ${info.Source}, ${info.asString}"$)
End If
End Sub
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
loading_phrase=DonManfred presents
promo_code=
Fetching
** Activity (main) Resume **
Fetch Succeeded
lib:Raising.. config_onfetchcomplete()
Config_onFetchComplete(true)
Activate fetched values
loading_phrase=DonManfred presents
Loading phrase info: Source 2, DonManfred presents
Promocode info: Source 2, PROMO17
** Activity (main) Pause, UserClosed = false **