fromFile
Loads a CoreConfiguration from a JSON file in the app's assets/ directory.
This is the recommended approach for most apps. Download the config file from your Salesforce org (Setup > Embedded Service Deployments > your deployment > Get Code File) and place it at src/main/assets/configFile.json (or a custom path).
Parameters
An Android Context. The application context is used internally.
The asset file path relative to the assets/ directory. Defaults to "configFile.json".
Optional channel address identifier for scoping cached data to a specific messaging channel. See Configuration.channelAddressIdentifier.
Set to true if the deployment requires user verification.
Locale-to-language mapping for custom label resolution. See Configuration.remoteLocaleMap.
Optional extension enabling voice and video capabilities.
The client protocol version. Defaults to ClientType.MIAW_MOBILE_V1.
The SDK product name. Defaults to ClientName.MOBILE_IN_APP_SDK.
Controls attachment behavior such as the maximum number of files per message. See Configuration.attachmentConfiguration.
Throws
If the file cannot be found or read from assets.
If the JSON content cannot be deserialized into a valid configuration.
Samples
val configuration = CoreConfiguration.fromFile(
context,
remoteLocaleMap = mapOf("en-CA" to "en", "fr-FR" to "fr", "default" to "en")
)