Configure the Android Agent to Report Session Replay

To report Session Replay for your mobile application, you must configure the Android Agent as follows:
  1. Initialise the agent by the following methods:
    • .withSessionReplayEnabled(true)

    • .withBlobServiceURL(configHelper.getSessionReplayUrl())

    • (Optional) Default configuration: RenderingMode.NATIVE_MODE.withSessionReplayRenderingMode(RenderingMode.WIREFRAME_MODE)

    import com.appdynamics.eumagent.runtime.Instrumentation;
    ...
    @Override public void onCreate(Bundle savedInstanceState) {
      Instrumentation.start(AgentConfiguration.builder()
        .withAppKey("<EUM_APP_KEY>")
        .withContext(getApplicationContext())
        // The default SaaS EUM Server and Screenshot Service are in the Americas,
        // so you can omit the following settings if you are in the Americas.
        .withSessionReplayEnabled(true)
        .withBlobServiceURL(configHelper.getSessionReplayUrl()) 
        .build());
      ...
    }
  2. In your app module-level build.gradle file, add session replay SDK.
    
    ...
    ...
    repositories {
            maven {
                url = "https://sdk.smartlook.com/android/release"
            }
        }
    ...
    ...
    dependencies {
            implementation 'com.cisco.android:sr-instrumentation-session-recording-core:1.0.12' 
    }
To protect user privacy during session recordings, configure Session Replay to mask sensitive data by enabling options that obscure all text and input fields by default. For more information, see Handle Sensitive Data.