Sync Configs Provider
- Kotlin
- Java
Analyzes the config file downloaded from Playground located in the assets folder of the project and provides initialization information for SyncDatabase.
Summary
Public methods
createFromConfigFile()
suspend fun createFromConfigFile(
context: Context,
authType: SupportedAuthType = SupportedAuthType.CCG,
configFileName: String = "config.yaml"
):ResultCompat<SyncConfigsProvider>
Reads the config file in the assets folder and creates a SyncConfigsProvider that provides necessary information for SyncDatabase initialization.
Parameters | |
---|---|
context: Context | Context |
authType: SupportedAuthType | The authentication type, currently only Client Credentials Grant is used and set as the default. |
configFileName: String | The name of the config file in the assets folder for creating SyncConfigsProvider. The default value is config.yaml, but you can change the file name as needed and reflect it in the parameter. |
Returns | |
---|---|
A wrapper class that encapsulates the result of creating a provider that provides necessary information for SyncDatabase initialization. The provider analyzes the config file downloaded from Playground located in the assets folder of the project and provides initialization information. |
Analyzes the config file downloaded from Playground, located in the project's assets folder, to configure and provide initialization information for SyncDatabase.
Summary
Public static methods
createFromConfigFile()
ResultCompat<SyncConfigsProvider> createFromConfigFile(
@NonNull Context context,
@NonNull SupportedAuthType authType,
@NonNull String configFileName
):
Reads the configuration file from assets and creates a SyncConfigsProvider that provides the necessary information to initialize SyncDatabase.
Parameters | |
---|---|
@NonNull Context context | Context |
@NonNull SupportedAuthType authType | Authentication type; currently, only Client Credentials Grant is used and set as the default. |
@NonNull String configFileName | Name of the configuration file in the assets folder for creating SyncConfigsProvider. The default file name is config.yaml, but it can be changed as needed and used by specifying it as a parameter. |
Returns | |
---|---|
A wrapper class encapsulating the result of creating a provider that provides the necessary information for SyncDatabase initialization. The provider analyzes the config file downloaded from Playground, located in the project's assets folder, to configure and provide initialization information. |