Back to Blog

Did Jetpack Compose kill session replay?

What is Jetpack Compose?

Jetpack Compose is Android’s recommended modern toolkit for building native UI. Similar to Flutter UI framework, it simplifies and accelerates UI development. But unlike Flutter, which can be used across iOS and Android, Jetpack Compose only works for Android Apps. While both frameworks are relatively easy to use, Jetpack Compose is considered easier to use thanks to its declarative UI approach.

Android apps are basically a collection of views related together in a hierarchy. In order to update what data is displayed to the user a developer first needs to walk through the hierarchy to arrive at the correct node. But what if the developer forgets that the node appears in multiple views? Or if the node has disappeared from the view?

Jetpack Compose uses a declarative UI model to avoid this problem and reduce potential errors. With Compose, the developer builds the user interface by defining a set of composable functions that take in data and emit UI elements. They update the UI by calling the same composable function with different arguments. The composables are responsible for transforming the current application state into a UI every time the observable data updates.

For example when the user interacts with a UI element, an event is triggered. The app logic responds to the event, then the composable functions are automatically called again with new parameters. This updates the UI essentially regenerating the entire screen from scratch. 

Does Jetpack Compose work with digital experience analytics?

Increased productivity and a reduction in errors sounds great, right? At the same time developers and product managers also want to monitor users' engagement, troubleshoot technical issues and improve experiences. They often turn to digital experience analytics solutions for this purpose.

But because Jetpack Compose does not use the traditional hierarchical views it is not fully supported by many DX solutions. Basically these solutions cannot identify the elements or text on the screen without predefined tagging. They are effectively blind to what is going on. This prevents mobile development teams from benefiting from capabilities such as:

  1. Replaying users sessions: To recreate a session and play it back DX solutions automatically capture user interactions with specific elements and any other content displayed on the screen. This lets the product manager see if users are tapping on a submit button, entering text into a field or scrolling to content.

  2. Identifying struggles: DX solutions can automatically detect struggle events such as rage clicks, errors or dead zooms associated with specific elements or screens. Analysts can use this information to prioritize improvements by users impacted.

  3. Diagnosing cause of crashes: The more advanced DX solutions capture crash details and show what a user was doing right before the crash, along with the state of their device and other technical parameters. This enables production support engineers to skip the recreating issues step and immediately get to the root cause of crashes.

  4. Masking sensitive information Of course capturing a user's data must be handled securely and privately. DX solutions can mask or hide Personal Identifiable Information (PII), as well as any other sensitive information. More robust solutions typically do this automatically, reducing risk of exposing this data.

Glassbox support for Jetpack Compose

Glassbox SDK is committed to supporting the latest frameworks. Our SDK supports Jetpack Compose so that all elements and interactions are automatically captured. Not just the element itself but even the text inside it. With Glassbox, you can ensure:

  • All session elements, content and user interactions are captured and replayable. Not just the ones tagged in advance.

  • Users' struggles are automatically identified, analyzed and scored.

  • Crashes can be correlated with user interactions and anomalies

  • User inputted text and other sensitive data is automatically detected and masked. Or you can define specific elements to mask. Views with elements masked are still fully captured except for the PII elements.

All of this happens with minimal impact on performance.

3 questions to ask when evaluating DX solutions for your Jetpack Compose app

Below are three questions you should ask when you’re in the vendor selection process:

  1. Do they offer just session replay or can you also search for and analyze interactions with specific elements?
  2. How will it impact your app's performance?
  3. What will the effort be on your part to meet compliance requirements? Do they enable masking PII by blanking entire screens or require you to identify and instrument each element? Do they support masking types of elements such as classes, text, input fields, etc.?

Take the next steps

Regardless of the digital experience analytics solution you choose, if your app is using Jetpack Compose it is recommended that you understand how your vendor intends to support your environment and the implications it will have on your app’s performance. Learn how Glassbox can help.

Boost your organization’s customer IQ

See why digital leaders use Glassbox to analyze over 1 trillion web and mobile sessions each year—and translate deep insights into enhanced digital experiences.