Skip to content

amplitude/AmplitudeSessionReplay-Android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation


AmplitudeSessionReplay-Android

Integrations

AmplitudeSessionReplay integrates via plugin to your core analytics library.

Instructions

Depending on the analytics library you use, you can use one of the following integrations to capture session replays.

Amplidue-Kotlin SDK

  1. Install the dependencies
implementation("com.amplitude:plugin-session-replay-android:[0.11.1, 1.0.0]")
implementation("com.amplitude:analytics-android:[1.16.8, 2.0.0]")
  1. Initialize the SDK
// Initialize Amplitude Analytics SDK instance
val amplitude = Amplitude(Configuration(
    apiKey = API_KEY,
    context = applicationContext,
    defaultTracking = DefaultTrackingOptions(sessions = true),
))
 
// Create and Install Session Replay Plugin
// Recording will be handled automatically
val sessionReplayPlugin = SessionReplayPlugin(sampleRate = 1.0)
amplitude.add(sessionReplayPlugin)

Developer docs

Ampitude-Android SDK (Legacy SDK)

  1. Install the dependencies
implementation("com.amplitude:middleware-session-replay-android:[0.11.1, 1.0.0]")
implementation("com.amplitude:android-sdk:[2.40.1,3.0.0]")
  1. Initialize the SDK
val amplitude = Amplitude.getInstance()
    .initialize(this, AMPLITUDE_API_KEY)
    // Replay events will be flushed on close as well
    // If setFlushEventsOnClose(false) you must call flush() manually
    .setFlushEventsOnClose(true)
 
// Create Session Replay Middleware
val sessionReplayMiddleware = SessionReplayMiddleware(amplitude, sampleRate = 1.0)
 
// Add session replay middleware
// Recording will be handled automatically
amplitude.addEventMiddleware(sessionReplayMiddleware)

Developer docs

Need Help?

If you have any issues using our SDK, feel free to create a GitHub issue or submit a request on Amplitude Help.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published