-
Notifications
You must be signed in to change notification settings - Fork 40
[MOB-12265] Configure start and end session #745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: loren/embedded/MOB-12263-android-add-ability-to-sync-embedded-messages
Are you sure you want to change the base?
[MOB-12265] Configure start and end session #745
Conversation
|
Diff Coverage: The code coverage on the diff in this pull request is 100.0%. Total Coverage: This PR will increase coverage by 0.97%. File Coverage Changes
🛟 Help
This is from Qlty Cloud, the successor to Code Climate Quality. Learn more. |
2 new issues
This is from Qlty Cloud, the successor to Code Climate Quality. Learn more. |
android/src/main/java/com/iterable/reactnative/RNIterableAPIModuleImpl.java
Show resolved
Hide resolved
android/src/main/java/com/iterable/reactnative/RNIterableAPIModuleImpl.java
Show resolved
Hide resolved
android/src/main/java/com/iterable/reactnative/RNIterableAPIModuleImpl.java
Show resolved
Hide resolved
android/src/main/java/com/iterable/reactnative/RNIterableAPIModuleImpl.java
Show resolved
Hide resolved
| static log(message?: unknown, ...optionalParams: unknown[]) { | ||
| if (!IterableLogger.loggingEnabled) return; | ||
|
|
||
| console.log(message, ...optionalParams); |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High
an access to apiKey
This logs sensitive data returned by
an access to apiKey
…RNIterableAPIModule
…mbeddedMessaging flag
…bedded-messages' into loren/embedded/MOB-12265-start-end-session
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds session management methods (startSession() and endSession()) to the embedded messaging functionality, enabling tracking of user sessions when viewing screens with embedded messages.
- Adds
startSession()andendSession()methods toIterableEmbeddedManager - Implements corresponding methods in
IterableApiand native bridge layer - Provides Android implementation in both old and new architecture modules
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/embedded/classes/IterableEmbeddedManager.ts | Adds startSession() and endSession() public methods with JSDoc documentation |
| src/core/classes/IterableApi.ts | Adds startEmbeddedSession() and endEmbeddedSession() static methods to API layer |
| src/api/NativeRNIterableAPI.ts | Extends native module interface with session management methods |
| example/src/components/Embedded/Embedded.tsx | Adds UI buttons and handlers to demonstrate session management in example app |
| android/src/oldarch/java/com/RNIterableAPIModule.java | Implements React methods for old architecture Android bridge |
| android/src/newarch/java/com/RNIterableAPIModule.java | Implements React methods for new architecture Android bridge |
| android/src/main/java/com/iterable/reactnative/RNIterableAPIModuleImpl.java | Implements session management by delegating to native Android SDK's EmbeddedSessionManager |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * @example | ||
| * ```typescript | ||
| * IterableEmbeddedManager.startSession(); | ||
| * ``` |
Copilot
AI
Nov 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example shows static method call IterableEmbeddedManager.startSession(), but this should be an instance method call via Iterable.embeddedManager.startSession() to match the actual usage pattern in the SDK.
| * ``` | ||
| */ | ||
| startSession() { | ||
| return IterableApi.startEmbeddedSession(); |
Copilot
AI
Nov 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example shows static method call IterableEmbeddedManager.endSession(), but this should be an instance method call via Iterable.embeddedManager.endSession() to match the actual usage pattern in the SDK.
| /** | ||
| * Starts a session. | ||
| * | ||
| * As session is a period of time when a user is on a screen or page that can |
Copilot
AI
Nov 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in documentation: "As session" should be "A session".
| * As session is a period of time when a user is on a screen or page that can | |
| * A session is a period of time when a user is on a screen or page that can |
…e user identification
…terableEmbeddedManager
🔹 JIRA Ticket(s) if any
✏️ Description
Adds the ability to start and end an embedded session
Testing
yarn android