-
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?
Changes from 6 commits
1bee2d6
0ba0b7f
24d5a70
be8998a
cbb547f
eb0dff5
efbda57
67e116b
bab2b35
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,9 @@ import { IterableApi } from '../../core/classes/IterableApi'; | |
| export class IterableEmbeddedManager { | ||
| /** | ||
| * Whether the embedded manager is enabled. | ||
| * | ||
| * This is set through the `enableEmbeddedMessaging` flag in the | ||
| * `IterableConfig` class. | ||
| */ | ||
| private _isEnabled = false; | ||
|
|
||
|
|
@@ -41,4 +44,41 @@ export class IterableEmbeddedManager { | |
| getPlacementIds() { | ||
| return IterableApi.getEmbeddedPlacementIds(); | ||
| } | ||
|
|
||
| /** | ||
| * Starts a session. | ||
| * | ||
| * As session is a period of time when a user is on a screen or page that can | ||
| * display embedded messages. | ||
| * | ||
| * When a user comes to a screen or page in your app where embedded messages | ||
| * are displayed (in one or more placements), a session should be started. | ||
| * | ||
| * @example | ||
| * ```typescript | ||
| * IterableEmbeddedManager.startSession(); | ||
| * ``` | ||
|
Comment on lines
57
to
60
|
||
| */ | ||
| startSession() { | ||
| return IterableApi.startEmbeddedSession(); | ||
|
Comment on lines
+60
to
+63
|
||
| } | ||
|
|
||
| /** | ||
| * Ends a session. | ||
| * | ||
| * When a user leaves a screen in your app where embedded messages are | ||
| * displayed, the session should be ended. This causes the SDK to send | ||
| * session and impression data back to the server. | ||
| * | ||
| * A session is tracked when it is ended, so you should be able to find | ||
| * tracking data after this method is called. | ||
| * | ||
| * @example | ||
| * ```typescript | ||
| * IterableEmbeddedManager.endSession(); | ||
| * ``` | ||
| */ | ||
| endSession() { | ||
| return IterableApi.endEmbeddedSession(); | ||
| } | ||
| } | ||
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".