Skip to main content
Version: 1.1.x

Configuration

Artifact
ai.coryn.replay.api:core

Pass initialisation settings to Coryn.init and recording settings to Coryn.startRecording. The Kotlin DSL and Java builders configure the same options. A later init or start request does not update an earlier configuration.

Initialisation scopes​

Package
ai.coryn.replay.api.core.model.initialisationscope
Signature
abstract class CorynInitialisationScope {
fun network(action: CorynInitialisationNetworkScope.() -> Unit)
abstract fun network(action: CorynConsumer<CorynInitialisationNetworkScope>)
fun logViewerIndicator(action: CorynInitialisationLogViewerIndicatorScope.() -> Unit)
abstract fun logViewerIndicator(action: CorynConsumer<CorynInitialisationLogViewerIndicatorScope>)
}

interface CorynInitialisationNetworkScope {
var baseUrl: String
var isUploadOnMeteredNetworkAllowed: Boolean
}

interface CorynInitialisationLogViewerIndicatorScope {
var visibility: CorynLogViewerIndicatorVisibility
var paddingTop: Int
var paddingRight: Int
}

These scopes are supplied by the SDK; configure them inside the initialisation callback.

Kotlin DSL optionDefaultMeaning
network.baseUrlSDK hosted API endpointOverride only for self-hosted services.
network.isUploadOnMeteredNetworkAllowedfalsePermit recording, UI capture, and diagnostic uploads on metered networks.
logViewerIndicator.visibilityVISIBLE_IF_ANY_ERRORSWhen to show the optional Log Viewer indicator.
logViewerIndicator.paddingTop0 dpAdditional top padding, beyond the status bar offset and built-in touch area.
logViewerIndicator.paddingRight0 dpAdditional right padding, beyond the built-in touch area.

See initialisation configuration for supported indicator visibility values. Negative indicator padding reduces the built-in offset. The upload setting controls uploads, not recording or every SDK network request. See Synchronisation. Include the optional Log Viewer artifact to use the in-app viewer.

CorynConfiguration​

Package
ai.coryn.replay.api.core.model.configuration

Create an initialisation configuration through CorynConfiguration.Builder(). Builder setters return the builder for chaining; unset options use the defaults above.

Signature
// CorynConfiguration companion factory
fun Builder(): CorynConfiguration.Builder

// CorynConfiguration.Builder members
fun setNetworkBaseUrl(baseUrl: String): Builder
fun setUploadOnMeteredNetworkAllowed(isAllowed: Boolean): Builder
fun setLogViewerIndicatorVisibility(visibility: CorynLogViewerIndicatorVisibility): Builder
fun setLogViewerIndicatorPaddingTop(paddingTop: Int): Builder
fun setLogViewerIndicatorPaddingRight(paddingRight: Int): Builder
fun build(): CorynConfiguration
Java usage
CorynConfiguration configuration = CorynConfiguration.Builder()
.setUploadOnMeteredNetworkAllowed(false)
.setLogViewerIndicatorVisibility(CorynLogViewerIndicatorVisibility.GONE)
.build();
Coryn.init(application, apiKey, configuration);

Recording configuration​

CorynStartRecordingScope​

Package
ai.coryn.replay.api.core.model.startrecordingscope
Signature
interface CorynStartRecordingScope {
var isUiCapturingEnabled: Boolean
var listener: CorynRecordingListener?
var overscrollStrategy: OverscrollStrategy
var memoryLeakCodePackages: Set<String>
}
OptionDefaultMeaning
isUiCapturingEnabledtrueEnable visual UI snapshots; also requires the backend feature flag.
listenernullReceive the session ID on the main thread when recording starts. Use it to correlate analytics or crash reports.
overscrollStrategyAdditionalPaddingPercent(5f)Expand hiding bounds in affected overscroll directions. See overscroll options.
memoryLeakCodePackagesemptySet()Additional code packages, including subpackages, for Fragment/ViewModel leak diagnostics.

Disabling UI captures does not disable automatic Screen Text collection. Apply hiding declarations to exclude sensitive text.

Leak diagnostics always include packages inferred from the Application subclass and manifest-declared Activities and Services. Add the packages containing your code, which can differ from applicationId, to cover sibling packages or feature modules. Reports identify potential leaks after a rate-limited garbage collection check; they do not include heap analysis or retaining-reference paths. See Built-in State Providers.

CorynRecordingConfiguration​

Package
ai.coryn.replay.api.core.model.configuration
Signature
// CorynRecordingConfiguration companion factory
fun Builder(): CorynRecordingConfiguration.Builder

// CorynRecordingConfiguration.Builder members
fun setUiCapturingEnabled(isEnabled: Boolean): Builder
fun setRecordingListener(listener: CorynRecordingListener?): Builder
fun setOverscrollStrategy(strategy: OverscrollStrategy): Builder
fun setMemoryLeakCodePackages(packages: Set<String>): Builder
fun build(): CorynRecordingConfiguration

Builder setters return the builder. setMemoryLeakCodePackages copies the supplied set. Unset options use the recording defaults above.

The configuration also exposes var isUiCapturingEnabled: Boolean?; null selects the default when starting. Changing a configuration after the first start request is not a way to update an active recording.

Java usage
CorynRecordingConfiguration configuration = CorynRecordingConfiguration.Builder()
.setUiCapturingEnabled(true)
.setRecordingListener(sessionId -> {
// Correlate this session with your analytics.
})
.build();
Coryn.startRecording(configuration);

CorynConsumer​

Package
ai.coryn.replay.api.core.model.callback
Signature
fun interface CorynConsumer<T : Any> {
fun accept(arg: T)
}

Java-friendly callback used by initialisation scopes. The SDK supplies the scope argument. Initialisation callbacks run on the main thread; keep them short.