IntrospectionModule
class IntrospectionModule(config: IntrospectionConfig, sessionCapture: SessionCapture, platformContext: PlatformContext) : ModuleWithLogic<IntrospectionState, IntrospectionAction, IntrospectionLogic>
Lightweight module for session capture and introspection.
Use this module standalone in production apps to capture session data for crash reports without including DevTools networking code.
The SessionCapture instance is created externally and shared across modules:
val sessionCapture = SessionCapture()
val introspectionConfig = IntrospectionConfig(
clientName = "MyApp",
platform = "Android ${Build.VERSION.RELEASE}"
)
val store = createStore {
module(IntrospectionModule(introspectionConfig, sessionCapture, platformContext))
// ... other modules
}
// Install crash handler (any platform)
CrashHandler(platformContext, sessionCapture).install()Content copied to clipboard
The captured session JSON is compatible with DevTools ghost device import.
Parameters
config
Introspection configuration for identity and behavior
sessionCapture
Shared SessionCapture instance for recording events
platformContext
Platform-specific context for file operations
Constructors
Link copied to clipboard
constructor(config: IntrospectionConfig, sessionCapture: SessionCapture, platformContext: PlatformContext)