Skip to content

feat: [SDK-2121] implement session replay for react native android#456

Merged
beekld merged 13 commits intomainfrom
beeklimt/SDK-2121
Apr 15, 2026
Merged

feat: [SDK-2121] implement session replay for react native android#456
beekld merged 13 commits intomainfrom
beeklimt/SDK-2121

Conversation

@beekld
Copy link
Copy Markdown
Contributor

@beekld beekld commented Apr 2, 2026

Summary

This is a fairly straightforward adaptation of the iOS version of the plugin.

How did you test this change?

There are some unit tests, but the primary test was by creating a react native test app, configuring it with my own LD key, and verifying that Android session replay worked the same as iOS session replay.

Are there any deployment considerations?

No.


Note

Medium Risk
Introduces new Android-native initialization and lifecycle control for session replay using LaunchDarkly Observability/SessionReplay plugins, which could affect app startup and data capture behavior if misconfigured.

Overview
Adds Android session replay support to @launchdarkly/react-native-ld-session-replay, replacing the previous “not supported” rejections with real configure/startSessionReplay/stopSessionReplay implementations.

Introduces SessionReplayClientAdapter to initialize an offline LDClient with the Observability and SessionReplay plugins, apply enable/disable via LDReplay.start()/stop(), and map JS options into ReplayOptions privacy masking settings on the main thread.

Updates Android Gradle dependencies and unit test setup (JUnit5 + MockK), and adds both Kotlin and JS unit tests to cover option mapping and basic configure/start behavior.

Reviewed by Cursor Bugbot for commit d9a9964. Bugbot is set up for automated code reviews on this repo. Configure here.


Related Jira issue: SDK-2121: Implement Session Replay for React Native Android.

@launchdarkly-upra launchdarkly-upra bot changed the title feat: implement session replay for react native android feat: [SDK-2121] implement session replay for react native android Apr 2, 2026
@beekld beekld marked this pull request as ready for review April 2, 2026 16:04
@beekld beekld requested a review from a team as a code owner April 2, 2026 16:04
@beekld beekld requested a review from abelonogov-ld April 13, 2026 18:34
Copy link
Copy Markdown
Contributor

@abelonogov-ld abelonogov-ld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Android launching looks good!

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 294a5d5. Configure here.

@beekld beekld enabled auto-merge (squash) April 13, 2026 22:43
@beekld beekld merged commit a5af1d8 into main Apr 15, 2026
25 of 26 checks passed
@beekld beekld deleted the beeklimt/SDK-2121 branch April 15, 2026 21:26
abelonogov-ld added a commit that referenced this pull request Apr 17, 2026
* main:
  feat: [SDK-2197] Add `LDReplay. registerActivity()` method for React Native. (#472)
  docs: [SDK-2206] add README for .NET AspSampleApp (#473)
  feat: [SDK-2190] add dialogs to the RN session replay example app (#471)
  feat: [SDK-2121] implement session replay for react native android (#456)
beekld pushed a commit that referenced this pull request Apr 17, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>launchdarkly-observability-android: 0.39.0</summary>

##
[0.39.0](launchdarkly-observability-android-0.38.0...launchdarkly-observability-android-0.39.0)
(2026-04-17)


### Features

* [SDK-2197] Add `LDReplay. registerActivity()` method for React Native.
([#472](#472))
([f99b566](f99b566))
</details>

<details><summary>session-replay-react-native: 0.4.0</summary>

##
[0.4.0](session-replay-react-native-0.3.0...session-replay-react-native-0.4.0)
(2026-04-17)


### Features

* [SDK-2121] implement session replay for react native android
([#456](#456))
([a5af1d8](a5af1d8))
* [SDK-2190] add dialogs to the RN session replay example app
([#471](#471))
([c677962](c677962))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

[SDK-2197]:
https://launchdarkly.atlassian.net/browse/SDK-2197?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[SDK-2121]:
https://launchdarkly.atlassian.net/browse/SDK-2121?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[SDK-2190]:
https://launchdarkly.atlassian.net/browse/SDK-2190?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Release-only version/changelog updates with no functional code changes
in this PR; risk is limited to publishing/packaging correctness.
> 
> **Overview**
> Updates release metadata to publish new versions of **Android
observability** and **React Native session replay** packages.
> 
> Bumps `sdk/@launchdarkly/observability-android` from `0.38.0` to
`0.39.0` (manifest + Gradle version) and records the new changelog entry
noting `LDReplay.registerActivity()` support for React Native.
> 
> Bumps `@launchdarkly/session-replay-react-native` from `0.3.0` to
`0.4.0` (manifest + `package.json`) and updates its changelog to include
React Native Android session replay implementation and example app
dialog coverage.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
0dad023. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants