Edit in GitHubLog an issue

Configuration API reference

clearUpdatedConfiguration

You can clear any programmatic updates made to the configuration via the clearUpdatedConfiguration API. This will clear programmatic updates to configuration made via the updateConfiguration API. It will also clear any updates to the MobilePrivacyStatus(Android)/ PrivacyStatus(iOS) made via setPrivacyStatus.

Here are some scenarios based on the order of calls:

  1. configureWithAppId
  2. updateConfiguration
  3. clearUpdatedConfiguration

Result: You end up with the initial configuration set via configureWithAppId.

  1. configureWithFileInPath
  2. updateConfiguration
  3. clearUpdatedConfiguration

Result: You end up with the initial configuration set via configureWithFileInPath.

  1. configureWithAppId or configureWithFileInPath or configureWithFileInAssets
  2. updateConfiguration
  3. clearUpdatedConfiguration
  4. updateConfiguration

Result: In this example, the configuration will be the most recently updated configuration and will not have any keys from the first update unless they are included in the most recent update.

  1. configureWithAppId or configureWithFileInPath or configureWithFileInAssets
  2. setPrivacyStatus
  3. clearUpdatedConfiguration

Result: In this example, the configuration will have the initial MobilePrivacyStatus(Android)/ PrivacyStatus(iOS) set via configureWithAppId or configureWithFileInPath or configureWithFileInAssets.

Java

Syntax

Copied to your clipboard
public static void clearUpdatedConfiguration();

Example

Copied to your clipboard
MobileCore.clearUpdatedConfiguration();

configureWithAppID

You can use this API to download and apply the remote configuration for the provided app ID to the current session. Once downloaded, the configuration is stored in the local cache to prevent unnecessary downloads. The configuration is fetched only if remote changes are detected.

When you configure a mobile property, a unique environment ID is generated that the SDK uses to retrieve your configuration. The remote configuration is available when an app configuration is created and published to a given environment.

Java

Syntax

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

Example

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

configureWithFileInAssets

You can use this API to load the configuration from the JSON configuration file in the app's Assets folder.

Java

Syntax

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

Example

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

configureWithFileInPath

You can use this API to load the configuration from the bundled JSON configuration file in your app package.

To pass in a bundled path and file name:

Java

Syntax

Copied to your clipboard
public static void configureWithFileInPath(@NonNull 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(@NonNull final Map configMap);

Example

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