Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim cfg As RemoteConfig
End Sub
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("Month": 1, "loading_phrase": "Hallo world!"))
Log("loading_phrase="&cfg.getString("loading_phrase"))
Log("Fetching")
cfg.fetch(86400)
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"))
End If
End Sub