Skip to content
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

Merge Embedded test #658

Closed
wants to merge 70 commits into from
Closed

Merge Embedded test #658

wants to merge 70 commits into from

Conversation

evantk91
Copy link
Contributor

🔹 Jira Ticket(s) if any

✏️ Description

Please provide a brief description of what this pull request does.

evantk91 and others added 30 commits February 23, 2023 17:30
…data-types

[MOB-5393] creates embedded message data types
….com:Iterable/iterable-android-sdk into evan/MOB-5395-embedded-message-serialization
…serialization

[MOB-5395] embedded message serialization
* adds base embedded manager

* creates separate json file for test embedded message payload

* reads message json from file

* Base manager class

Iterable API initializes with embeddedmanager in memory
constants class now have a constant to hit the right API
embeddedmanager now has listeners interfaces and getter setter placeholders.
It also has a timer placeholder. Not functional yet though
Requestprocessor has offline mode assigned to embedded messages as well.
embeddedmanager makes an api call. Incomplete state as of now

* [MOB-5762] - Time based AutoSync

Schedule sync happens after every determined duration.
Still not perfect. Especially in situation of going to background and coming to foreground in time less than the autofetch interval. Possiblity of multiple looper posts

* Delete json file in package

* [MOB-5785] - Sync remote embedded messages

1. update the local list of messages with remote messages instead of directly assigning remote message to local list.
2. Keep placeholder places for places to call delivery and deletion where new message is identified and old message is identified gotten deleted

* Fix Tests

* Fixes a bug

Fixes a bug where SDK would not resume the sync thinking there is already a sync scheduled but was indeed skipped due to app in background.

* Adjusting TODO as per comments

* [MOB - 5764] - Renaming

Renaming autoFetchInterval names as per last PR suggestion

* Removing comments and making it work with api

* updates logs and parsing of incoming payload

* minor edits

* adds live data for local messages queue

* adds mock embedded manager

* Replacing hardcoded email with logged in email.

Also adding a todo

* Adding TODO for placementId

* onMessageUpdate implementation

* [MOB-5983] - Refactor code

* removes redundant getEmbeddedManager call

* removes test function from manager

* rename route

* adds boundary to auto fetching

* minor edits

* minor edits

* removes autoFetchDuration from scheduleSync signature

* adds called to custom track event

* sets up click tracking using custom track event

* rename for consistency

* adds button identifier to the embedded click signature

* adds button identifier to custom event payload

* adds buttonIdentifier to trackEmbeddedClick call on IterableApiClient

* addresses comments

* aligns click event with corresponding iOS call

* removes log statement

* addes serialization of button action

* updates message id throughout SDK

* changes message id back to work with current backend

* sets up trackEmbeddedMessageReceived function in IterableApiClient

* removes custom event call

* sets up embedded message received unit test

* refactors assigning of userKey for embedded calls

* adds connection to associated endpoint

* removes jacoco.exec

* updates .gitignore and refactor

* Connects track embedded message click to endpoint

* [MOB-6135] - Check SDK initialization before API call

Similar implementation to getInAppMessages where SDK initialization is checked before making a call to API

* Comment changes

* addresses comments

* updates addEmailOrUserIdToUserKeyJson method signatures across analytics calls

* adds dependency

* removes redundant dependency

* sets up connection to impression tracking endpoint

* adds embedded session test

* addresses checkstyle comment

* updates impression tracking payload

* updates session id

* removes non-null annotation

* updates payload constants

* updates session payload

* addresses unit test error

* unit test fixes

* addresses check

* adds missing dependency

* remove dependency

* updates message id to match backend update

* Revert "updates message id to match backend update"

This reverts commit d0be2a9.

* updates message id across SDK

* updates IterableApiClient

* updates tests with message id:q

* updates embedded payloads to include email or userid fields

* [MOB - 6363] - Merge embedded session manager to Manager (#585)

* creates embedded session manager startSession and endSession

* removes print statements

* [MOB-6216] implement impression tracking listeners (#576)

* adds impression handlers to embedded session manager

* [MOB-6217] implement impression tracking functions (#577)

* sets up embedded impression data class for calculating duration and display counts

* sets up impression tracking functions

* adds impression data manipulation to session manager

---------

Co-authored-by: [email protected] <[email protected]>

---------

Co-authored-by: [email protected] <[email protected]>

---------

Co-authored-by: [email protected] <[email protected]>

* [MOB - 6115] EM feature flagging (#578)

* [MOB-6115] - Feature flagging EM

* scheduling next call for other types of failures

* Adding Invalid Api Key in the gate too

This will prevent app with invalid api key to not unnecessarily make EM requests

* adds isEmbeddedEnabled flag for testing purposes

* sets up auto fetch duration as a livedata

* Revert "sets up auto fetch duration as a livedata"

This reverts commit 5f5178c.

* Revert "adds isEmbeddedEnabled flag for testing purposes"

This reverts commit 6bb17a7.

* Modifying the method call

* [MOB - 6362] Update subscription status (#586)

* New interface method

* Fixing Test

Setting EmbeddedMessaging disabled for test

---------

Co-authored-by: “Akshay <“[email protected]”>

---------

Co-authored-by: “Akshay <“[email protected]”>
Co-authored-by: [email protected] <[email protected]>

---------

Co-authored-by: Evan Greer <[email protected]>
Co-authored-by: “Akshay <“[email protected]”>
Co-authored-by: [email protected] <[email protected]>
Co-authored-by: Evan Takeo Kanaiaupuni Greer <[email protected]>
* updates impression tracking function signatures

* updates function naming

---------

Co-authored-by: [email protected] <[email protected]>
…n manager (#591)

* updates impression tracking function signatures

* updates function naming

* stashed changes

* makes sync messages public

* removes polling logic and makes syncMessages public

* removes notification helper change

* adds foreground and background callbacks to embedded session manager

* removes auto fetch interval from config

* stashed changes

* addresses comments

* updates callbacks

* minor changes

* reformating

* updates test utils

---------

Co-authored-by: [email protected] <[email protected]>
* adds IterableEmbeddedPlacement class

* updates unit tests to include placements

* various refactors

* updates embedded test message deserialization

---------

Co-authored-by: [email protected] <[email protected]>
* updates campaign id to int type

* minor edits

---------

Co-authored-by: [email protected] <[email protected]>
* adds IterableEmbeddedPlacement class

* updates unit tests to include placements

* various refactors

* updates embedded test message deserialization

* updates get messages to pull messages from placement

---------

Co-authored-by: [email protected] <[email protected]>
* adds checks if messages are empty

* minor changes

* adds checks to the startSession and endSession functions

* sets up reset function

* renaming for alignment with iOS SDK

* renames getEmbeddedMessages to getMessages

* removes library

---------

Co-authored-by: [email protected] <[email protected]>
# Conflicts:
#	iterableapi/build.gradle
#	iterableapi/src/main/java/com/iterable/iterableapi/IterableApiClient.java
@evantk91 evantk91 marked this pull request as draft November 28, 2023 17:57
@evantk91 evantk91 closed this Dec 4, 2023
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.

4 participants