Edit in GitHubLog an issue

Configuration API reference

configureWithAppID

This API causes the SDK to download the configuration for the provided app ID and apply the configuration to the current session.

Java

Syntax

Copied to your clipboard
public static void configureWithAppID(final String appId);

Example

Copied to your clipboard
MobileCore.configureWithAppId("1423ae38-8385-8963-8693-28375403491d");

configureWithFileInAssets

You can bundle a JSON configuration file in the app's Assets folder to replace or complement the configuration that was downloaded by using the Configure with App ID per environment approach.

Java

Syntax

Copied to your clipboard
public static void configureWithFileInAssets(final String fileName);

Example

Copied to your clipboard
MobileCore.configureWithFileInAssets("exampleJSONfile.json");

configureWithFileInPath

You can include a bundled JSON configuration file in your app package to replace or complement the configuration that was downloaded by using the Configure with App ID per environment approach.

To pass in a bundled path and file name:

Java

Syntax

Copied to your clipboard
public static void configureWithFileInPath(final String filePath);

Example

Copied to your clipboard
MobileCore.configureWithFileInPath("absolute/path/to/exampleJSONfile.json");

extensionVersion

The extensionVersion() API returns the version of the Configuration extension.

To get the version of the Configuration extension, use the following code sample:

Java

Copied to your clipboard
String coreExtensionVersion = MobileCore.extensionVersion();

updateConfiguration

You can also update the configuration programmatically by passing configuration keys and values to override the existing configuration.

Java

Syntax

Copied to your clipboard
public static void updateConfiguration(final Map configMap);

Example

Copied to your clipboard
HashMap<String, Object> data = new HashMap<String, Object>();
data.put("global.privacy", "optedout");
MobileCore.updateConfiguration(data);
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.