Skip to main content

Session Replay

app_session_replay_overview_header.png

Mobile Session Replay allows a visual representation of a user’s journey on mobile apps. The Session Replay feature provides comprehensive tools to capture and analyze user interactions and behavior within your application.

Importantly, the SDK never records the user screen; instead, it builds a hierarchy of components to ensure privacy while delivering detailed insights.

The QualtricsSR class serves as the primary interface for controlling these functionalities, offering a streamlined approach to managing recording sessions.

This section will guide you through the process of setting up and recording a session. Additionally, it covers important aspects of logging and custom error handling.

Basic usage​

This section provides instructions for the basic implementation of the SDK, so you can quickly integrate it into your application without needing to dive into more complex features just yet. By following these steps, you'll effectively deploy Session Replay using our SDK's capabilities.

Initialization​

The initializeProject method sets up the SDK with necessary identifiers and prepares it to work with your app's main interface. It must be called before any session recording activities.

This method should be invoked in the main activity of your application.

Parameters:​
ParameterDescription
activityYour main activity.
brandIdA unique identifier for the brand. This ID can be retrieved from your project settings inside the Installation Tab.
projectIdA unique identifier for the project within the brand. This ID can be retrieved from your project settings inside of the Installation tab.
Return value:​
ParameterDescription
InitializationResultStatus indicating the result of the initialization process.
Usage:​
val result = QualtricsSR.instance().initializeProject(
yourMainActivity,
"yourBrandId",
"yourProjectId"
)

// Validate result
InitializationResult result = QualtricsSR.Companion.instance().initializeProject(
yourMainActivity,
"yourBrandId",
"yourProjectId"
);

// Validate result

Starting the session​

The startRecording method initiates a new session recording with your specified configuration. Before calling this method, ensure that initializeProject has been successfully executed.

Once startRecording is called, Session Replay is configured in the basic scope. That is the minimal implementation needed for the SDK to work.

Return Value:​
ParameterDescription
SessionStartResultStatus indicating the result of the start recording process.
Usage:​
val startResult = QualtricsSR.instance().startRecording()
QualtricsSR.Companion.instance().startRecording((result) -> {
// Handle the result
});

Advanced Data Protection​

This section focuses on features related to session control and debugging. Our advanced features allow you to gain finer control over session management and gather detailed insights through logging.

Pausing the session​

The pauseRecording method pauses a recording (without closing it, the same session can be resumed). It can be used to ensure that there are no signals detected or screens captured for certain parts of the application. Make sure the session is running before calling this method.

val pauseResult = QualtricsSR.instance().pauseRecording()  

Resuming the session​

The resumeRecording method resumes a paused recording (no new session is created, the existing one is being continued). Make sure the session is paused before calling this method.

val resumeResult = QualtricsSR.instance().resumeRecording()  

Stopping the session​

To manually close the session and stop the recording use stopRecording method.

If not called, the session will be properly closed automatically.

val stopResult = QualtricsSR.instance().stopRecording()
QualtricsSR.Companion.instance().stopRecording((result) -> {
// Handle the result
});

Screen Capture​

The Screen Capture feature records screen names as they change during the session to improve understanding of user interactions—for example, when a user navigates from the Home screen to the Profile screen.

Automatic Screen Capture​

Automatic Screen Capture records every screen change automatically after one-time setup.

Work in progress.

Manual Screen Capture​

Manual Screen Capture requires explicit tracking calls to record screen changes during sessions.

Work in progress.

Errors & Insights​

Errors​

It is possible to pass a custom error to the Qualtrics SDK. If a tap occurs before logError, it will be linked to this error and reported as an Error tap.

Parameters:​
ParameterDescription
message (optional)Custom message for the detected error (should not contain any sensitive data)
Usage:​
QualtricsSR.instance().logError("Custom Error Message")

Logging​

Enable debug logs by adding allowed tags to this set. Each feature of this SDK logs with different tags to allow the developers to decide which tags to enable. If the set is empty, nothing will be logged.

QualtricsSR.instance().allowedLoggingTags = setOf(
// list of tags
)

Supported tags:

enum class LogTag {
LIFECYCLE,
GESTURE,
SIGNAL,
PLAYBACK,
NETWORK,
THREADING,
NAVIGATION,
}

To listen to Qualtrics logs for monitoring and troubleshooting purposes use addLogListener method. Only the allowed logging tags will be listened to.

QualtricsSR.instance().addLogListener(listener: yourListener)