Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Latest commit

 

History

History
16 lines (12 loc) · 819 Bytes

json-config-remote.md

File metadata and controls

16 lines (12 loc) · 819 Bytes

Override the ADBMobile JSON config path

You can load a different ADBMobile JSON config file when the application starts.

The Config.overrideConfigStream(configInput) method allows you to specify the path to a different ADBMobile.json configuration file when the application starts. This method must be called before any other Experience Cloud SDK call (before Config.collectLifecycleData() ), typically in the onCreate method of your first loaded activity.

Calling this method with a different path causes a one-time override of the configuration file until the application is closed.

 try { 
   InputStream configInput = getAssets().open("ExampleJSONFile.json"); 
   Config.overrideConfigStream(configInput); 
   } catch (IOException ex) { 
   // do something with the exception if needed 
}