Skip to content

Conversation

davidtruong
Copy link
Contributor

@davidtruong davidtruong commented Jan 29, 2024

🔹 Jira Ticket(s) if any

✏️ Description

GA ready embedded build branch

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: evan.greer@iterable.com <evan.greer@evan.greer>

---------

Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer>

---------

Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer>

* [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 <“ayyanchira.akshay@gmail.com”>

---------

Co-authored-by: “Akshay <“ayyanchira.akshay@gmail.com”>
Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer>

---------

Co-authored-by: Evan Greer <evan.greer@iterable.com>
Co-authored-by: “Akshay <“ayyanchira.akshay@gmail.com”>
Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer>
Co-authored-by: Evan Takeo Kanaiaupuni Greer <56953678+evantk91@users.noreply.github.com>
* updates impression tracking function signatures

* updates function naming

---------

Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer>
…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: evan.greer@iterable.com <evan.greer@evan.greer>
* adds IterableEmbeddedPlacement class

* updates unit tests to include placements

* various refactors

* updates embedded test message deserialization

---------

Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer>
* updates campaign id to int type

* minor edits

---------

Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer>
* 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: evan.greer@iterable.com <evan.greer@evan.greer>
* 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: evan.greer@iterable.com <evan.greer@evan.greer>
# Conflicts:
#	iterableapi/build.gradle
#	iterableapi/src/main/java/com/iterable/iterableapi/IterableApiClient.java
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

Attention: 188 lines in your changes are missing coverage. Please review.

Comparison is base (3dd3939) 62.59% compared to head (006c993) 62.74%.

Files Patch % Lines
...com/iterable/iterableapi/EmbeddedSessionManager.kt 19.04% 49 Missing and 2 partials ⚠️
...va/com/iterable/iterableapi/IterableApiClient.java 57.83% 32 Missing and 3 partials ⚠️
...ain/java/com/iterable/iterableapi/IterableApi.java 36.17% 21 Missing and 9 partials ⚠️
.../iterable/iterableapi/IterableEmbeddedPlacement.kt 84.04% 16 Missing and 14 partials ⚠️
...om/iterable/iterableapi/IterableEmbeddedManager.kt 72.89% 24 Missing and 5 partials ⚠️
...com/iterable/iterableapi/EmbeddedImpressionData.kt 0.00% 8 Missing ⚠️
.../iterable/iterableapi/OfflineRequestProcessor.java 0.00% 3 Missing ⚠️
.../iterableapi/IterableFirebaseMessagingService.java 75.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #698      +/-   ##
==========================================
+ Coverage   62.59%   62.74%   +0.14%     
==========================================
  Files          70       75       +5     
  Lines        4157     4678     +521     
  Branches      479      529      +50     
==========================================
+ Hits         2602     2935     +333     
- Misses       1290     1444     +154     
- Partials      265      299      +34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@davidtruong davidtruong changed the title Embedded clean merge [MOB-5473] Embedded clean merge Jan 29, 2024
@davidtruong davidtruong changed the title [MOB-5473] Embedded clean merge [MOB-5473] Embedded GA Release Jan 29, 2024
davidtruong and others added 8 commits January 29, 2024 12:58
…er-fix

[MOB-7749] card text container fix
Fiterable app was throwing error as resource not found. Making the resource with full name is making it work. Probably would be helpful in all projects having such conflicts in finding the resource.
Also bumping up the minSdkversion in api-ui
Full qualified name for style resource
@evantk91 evantk91 requested a review from Ayyanchira January 29, 2024 22:54
Copy link
Contributor

@evantk91 evantk91 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@Ayyanchira Ayyanchira left a comment

Choose a reason for hiding this comment

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

Looking great.. 🤞

implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.android.flexbox:flexbox:3.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation "com.github.bumptech.glide:glide:4.8.0"
Copy link
Member

Choose a reason for hiding this comment

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

Glide library can be discarded. Good that for now its in api-ui and not the api.

ext {
libraryName = 'iterableapi-ui'
libraryVersion = '3.4.17'
libraryVersion = '3.5.0-beta1'
Copy link
Member

Choose a reason for hiding this comment

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

Can be updated when releasing the new version

@Ayyanchira Ayyanchira merged commit 10fd74d into master Jan 30, 2024
@Ayyanchira Ayyanchira deleted the embedded-clean-merge branch January 30, 2024 19:50
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.

6 participants