Built-in State Providers
During an active Session Replay recording, Coryn AI automatically captures runtime context and errors. No application-side calls are required for the data points below, except Screen context, which requires registering Screens — see Screens.
Automatically captured context
| Data point | Description |
|---|---|
| Screen text | Text from eligible Views and Compose semantics, excluding hidden sources and reported as incremental items; see Screen Text |
| Touch interactions | Active touch points, including multi-touch |
| Display and window configuration | Screen size, application window size, display density, orientation, and font scale |
| Application visibility | Foreground, background with an independent overlay or picture-in-picture, background without a visible view, or Screen off |
| Visible keyboard area | Height of the on-screen keyboard inset |
| CPU usage | Current processor usage as a percentage |
| Heap usage | Current application heap usage as a percentage |
| RAM usage | Current RAM usage as percentages |
| Network state | Network quality and whether cellular, Wi-Fi, or VPN is active |
| Potential memory leaks | Watched lifecycle objects that remain reachable after a garbage collection check, reported by class name |
| Main thread freezes | Intervals when the main thread was blocked |
| Jank frames | Intervals when the UI thread was blocked and scheduled frames could not be drawn |
Activity-owned dialogs and panels, including panels managed on a separate UI thread, do not count as independent background overlays. They remain part of foreground UI capture.
Screen off (ScreenOff) means Android reports the device as non-interactive, including Always-On Display and a fully off screen. It takes priority over foreground and overlay visibility; UI capture and State collection pause until the device becomes interactive again. This does not indicate whether authentication is required to unlock the phone.
Coryn can also capture Screen context (active Screen and arguments) after you register Screens in your app.
Automatically captured errors
| Error | Description |
|---|---|
| Crashes | Uncaught errors that terminate the application process |
| Native crashes | Fatal failures originating in native code |
| ANRs | Application Not Responding events |
Native crashes and ANRs are captured only on Android 11 and later (SDK 30+). Standard application crashes are captured on all Android versions.
Keep your existing crash reporter, such as Firebase Crashlytics. Use CorynRecordingListener to correlate its reports with Coryn sessions.
Potential memory leaks
Coryn reports potentially retained Activities, Services, Fragments, Fragment views and ViewModels, including in release builds. Legacy support Fragments are supported when that library is present; Android framework Fragments are supported on API 26+.
Reports contain class names, not proof of a leak or a heap analysis. Temporary retention can produce a report, and some leaks may be missed. Investigate candidates with your usual memory profiling tools.
Activity and Service reports cover manifest-declared components, including library Services. Fragment and ViewModel coverage defaults to code packages inferred from your Application subclass and manifest components.
Add packages for feature modules or sibling namespaces at recording start:
Coryn.startRecording {
memoryLeakCodePackages = setOf(
"com.example.checkout",
"com.example.shared.presentation"
)
}
Each entry includes its subpackages. Use the packages containing your code, which may differ from applicationId. These entries extend the inferred defaults; they do not replace them. An empty set uses only inferred packages. Java callers use CorynRecordingConfiguration.Builder().setMemoryLeakCodePackages(...).
You can keep an existing LeakCanary ObjectWatcher integration alongside Coryn.
UI capture availability
See UI Captures for supported content and capture limitations, and Toasts for Toast integration.
Related
- Screens — register Screens for navigation context
- Recording lifecycle — when recording runs
- States — add your own continuous context