Configuration
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
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 option | Default | Meaning |
|---|---|---|
network.baseUrl | SDK hosted API endpoint | Override only for self-hosted services. |
network.isUploadOnMeteredNetworkAllowed | false | Permit recording, UI capture, and diagnostic uploads on metered networks. |
logViewerIndicator.visibility | VISIBLE_IF_ANY_ERRORS | When to show the optional Log Viewer indicator. |
logViewerIndicator.paddingTop | 0 dp | Additional top padding, beyond the status bar offset and built-in touch area. |
logViewerIndicator.paddingRight | 0 dp | Additional 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
Create an initialisation configuration through CorynConfiguration.Builder(). Builder setters return the builder for chaining; unset options use the defaults above.
// 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
CorynConfiguration configuration = CorynConfiguration.Builder()
.setUploadOnMeteredNetworkAllowed(false)
.setLogViewerIndicatorVisibility(CorynLogViewerIndicatorVisibility.GONE)
.build();
Coryn.init(application, apiKey, configuration);
Recording configuration
CorynStartRecordingScope
interface CorynStartRecordingScope {
var isUiCapturingEnabled: Boolean
var listener: CorynRecordingListener?
var overscrollStrategy: OverscrollStrategy
var memoryLeakCodePackages: Set<String>
}
| Option | Default | Meaning |
|---|---|---|
isUiCapturingEnabled | true | Enable visual UI snapshots; also requires the backend feature flag. |
listener | null | Receive the session ID on the main thread when recording starts. Use it to correlate analytics or crash reports. |
overscrollStrategy | AdditionalPaddingPercent(5f) | Expand hiding bounds in affected overscroll directions. See overscroll options. |
memoryLeakCodePackages | emptySet() | 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
// 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.
CorynRecordingConfiguration configuration = CorynRecordingConfiguration.Builder()
.setUiCapturingEnabled(true)
.setRecordingListener(sessionId -> {
// Correlate this session with your analytics.
})
.build();
Coryn.startRecording(configuration);
CorynConsumer
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.