loadConfigurations

suspend fun loadConfigurations(appId: String, context: Context, configsLoadedCallback: (Boolean) -> Unit = {})

Populate application's configurations from the composition resource. Only Binary and Parameter Resources are used to represent application configurations. The configCacheMap is reset on every configs load.

Sections in Composition with Binary or Parameter represents a valid application configuration. Example below is represents an application configuration uniquely identified by the ConfigType'application'. Sections can be nested like in the registers case.

{
"title": "Application configuration",
"mode": "working",
"focus": {
"reference": "Binary/11111",
"identifier: {
"value": "application"
}
}
}

Nested section example

 {
"title": "Register configurations",
"mode": "working",
"section": [
{
"title": "Household register configuration",
"focus": {
"reference": "Binary/11111115",
"identifier": {
"value": "all_household_register_config"
}
}
}
]
}

appId is a unique identifier for the application. Typically written in human readable form

context is the targeted Android context

configsLoadedCallback is a callback function called once configs have been loaded.