Skip to content

WireframeMapper

Xavier F. Gouchet edited this page Sep 4, 2024 · 1 revision

interface WireframeMapper<in T : View>

Maps a View to a List of MobileSegment.Wireframe. This is mainly used internally by the SDK but if you want to provide a different Session Replay representation for a specific View type you can implement this on your end.

Inheritors

BaseWireframeMapper
TraverseAllChildrenMapper

Functions

map

@UiThread

abstract fun map(view: T, mappingContext: MappingContext, asyncJobStatusCallback: AsyncJobStatusCallback, internalLogger: InternalLogger): List<MobileSegment.Wireframe>

Maps a View to a List in order to be rendered in the Session Replay player.

Parameters
view as the View instance that will be mapped
mappingContext in which we provide useful information regarding the current
asyncJobStatusCallback a callback that can be called when the mapper starts or finishes processing an async job. By calling this whenever a job started (in the caller thread) and finished (in the background thread) will make sure that the List<Wireframe> will not be consumed until all the wireframes are updated by the async jobs. It can be used to offload heavy work from the calling thread (main) to a background thread while mapping some view properties.
internalLogger the logger to log internal warnings
See also
MobileSegment.Wireframe
SystemInformation
Clone this wiki locally