Codavel SDK allows the configuration of some advanced settings for enabling some features, configuring security options and increasing the debug level. Please, before changing these settings make sure you know what you are doing. All the methods below are accessible via the BolinaConfiguration object that you need to pass to InterceptorSingleton.startInterceptor().

# App settings

• Java
• Kotlin
bolinaConfig.addBolinaURLReplacement(String originalURLRegex, String bolinaURL);

1
• Adds a new rule to be executed at each HTTP/HTTPS request. If the URL matches the expression configured, then Bolina will replace the matched expression with the configured URL. In case of Bolina fallback, the original URL will be used
• Java
• Kotlin
bolinaConfig.addFallbackURLReplacement(String bolinaURLRegex, String originalURL);

1
• Adds a new rule to be executed in case of Bolina fallback or performing A/B testing. If the URL used by bolina matches the expression configured, then Bolina will replace the matched expression with the configured URL.
• Java
• Kotlin
bolinaConfig.setConfigFolder(String configFolder);

1
• Sets the path used by Bolina core to store cached info. Default: application specific cache directory on the filesystem.

# A/B Testing setting

• Java
• Kotlin
bolinaConfig.setUseABTestingPerSession(boolean useABTestingPerSession);

1
• Enables or disables the ab testing per session. This flag changes the behavior of setABTestPercentage. When this flag is set to true, the ab test percentage is calculated per session, otherwise, it is calculated per request. A new session is created each time that Bolina is started.
• Default: true
• Java
• Kotlin
bolinaConfig.setABTestPercentage(int abTestPercentage);

1
• Sets the percentage of requests or sessions using Bolina or HTTP/HTTPS. Should be used with setUseABTestingPerSession to define if the ab testing is per session or per request.
• Accepted values: Any value between 1 and 100.
• Default: 1 , meaning that 1% of the requests or sessions will use HTTP/HTTPS, while the remainder 99% will use Bolina.

# Verbose settings

• Java
• Kotlin
bolinaConfig.setVerboseLevel(String verboseLevel);

1
• Changes the verbose level of Bolina client.
• Accepted values:
• critical (less logs)
• info
• debug
• trace (more logs).
• Default: critical

# Protocol settings

• Java
• Kotlin
bolinaConfig.setBolinaHandlerPattern(Pattern bolinaHandlerPattern);

1
• Sets the URLs to be handled via bolina. Any URL that match this pattern will use bolina, on the other hand, a URL that does not match this pattern will be transferred using regular HTTP/HTTPS.
• Default: Pattern.compile(".*"), meaning all requests are handled.
• Java
• Kotlin
bolinaConfig.setCertsEnabled(boolean enableCerts);

1
• Enables/disable the use of SSL certificates.
• Default: true
• Java
• Kotlin
bolinaConfig.setAllowSelfSignedCerts(boolean allowSelfSignedCerts);

1
• Enables/Disable the use of self signed SSL certificates. We strongly recommend the use of this option only for testing purposes.
• Default: false
• Java
• Kotlin
bolinaConfig.setMaxMemoryAllowed(long maxMemoryAllowed);

1
• Sets the maximum amount of memory used by bolina core, in bytes.
• Default: 10MB
• Java
• Kotlin
bolinaConfig.setZeroRtt(boolean enableZeroRtt);

1
• Enables or disables the use of 0-RTT in Bolina.
• Default: true
• Java
• Kotlin
bolinaConfig.setTimeToKeepAlive(int timeToKeepAlive);

1
• Sets the maximum time that a connection will be kept alive, in milliseconds.
• Default: 120000

# Insights settings

• Java
• Kotlin
bolinaConfig.setMonitorPercentage(int monitorPercentage);

1
• Sets the percentage of requests to be traced for detailed statistics in the insights dashboard. A value of 100 means all requests appear in the dashboard.
• Default: 100

# App UUID

• Java
• Kotlin
bolinaConfig.setAppUUID(String appUUID);

1
• Sets an unique identifier for each user, that can be used in Codavel Analytics' dashboards

# Debug build

• Java
• Kotlin
bolinaConfig.setDebugBuild(boolean setDebugBuild);

1
• Sets the value of the build type, that can be used in Codavel Analytics' dashboards.
• The code snippet provided is the recommended way setting the value of the build type. It uses the BuildConfig to check if the build is the DEBUG type.
• Default: false

We recommend to use the setDebugBuild by leveraging the app's BuildConfig.DEBUG variable, as follows:

• Java
• Kotlin
bolinaConfig.setDebugBuild(BuildConfig.DEBUG);

1