Runtime Configuration

Runtime configuration is an optional way to configure your app at runtime in place of an appboy.xml. Use of both runtime configuration and appboy.xml configuration is still possible. Runtime configured values will always take precedence over the same value in the appboy.xml. If the Braze SDK can find all values in the runtime configuration, then the appboy.xml is no longer needed and can be removed. See the full documentation here.

Example Usage

The configuration uses a builder object that is then built and passed to Appboy.configure(). The following example uses a subset of the runtime configuration options available, see the javadoc for a complete list of available configuration options.

1
2
3
4
5
6
7
8
AppboyConfig appboyConfig = new AppboyConfig.Builder()
        .setApiKey("api-key-here")
        .setCustomEndpoint("YOUR_CUSTOM_ENDPOINT_OR_CLUSTER")
        .setSessionTimeout(60)
        .setHandlePushDeepLinksAutomatically(true)
        .setGreatNetworkDataFlushInterval(10)
        .build();
Appboy.configure(this, appboyConfig);

Another example can be found in our Hello Braze sample app.

WAS THIS PAGE HELPFUL?
New Stuff!