iterable-android-sdk icon indicating copy to clipboard operation
iterable-android-sdk copied to clipboard

Checking duplicate messageIds before showing push

Open Ayyanchira opened this issue 3 years ago • 1 comments
trafficstars

🔹 Jira Ticket(s) if any

Hack Week - Avoid showing duplicate push messages

✏️ Description

  1. Comma seperated message Ids stored in shared preference
  2. Arraylist implementation where New messageIds added at last and removed from index0 to keep size less than 10
  3. All this functionality is clubbed into the new method: isDuplicateMessageId which now returns true if messageId duplicate is found. Else returns false where it successfully stores the last push messageId.

Remaining:

  1. Call trackDuplicate Api call when return value of true is returned from this new method.
  2. return false and do not proceed with showing the notification and discard the notification object created so far

Ayyanchira avatar Mar 16 '22 00:03 Ayyanchira

Codecov Report

Merging #439 (66ec5cc) into master (bc1de3e) will decrease coverage by 0.36%. The diff coverage is 36.84%.

:exclamation: Current head 66ec5cc differs from pull request most recent head 036fda7. Consider uploading reports for the commit 036fda7 to get more accurate results

@@            Coverage Diff             @@
##           master     #439      +/-   ##
==========================================
- Coverage   66.58%   66.21%   -0.37%     
==========================================
  Files          65       65              
  Lines        3899     3937      +38     
  Branches      457      463       +6     
==========================================
+ Hits         2596     2607      +11     
- Misses       1036     1058      +22     
- Partials      267      272       +5     
Impacted Files Coverage Δ
...ain/java/com/iterable/iterableapi/IterableApi.java 64.70% <0.00%> (-0.59%) :arrow_down:
...va/com/iterable/iterableapi/IterableApiClient.java 74.33% <0.00%> (-1.80%) :arrow_down:
...va/com/iterable/iterableapi/IterableConstants.java 0.00% <ø> (ø)
.../iterableapi/IterableFirebaseMessagingService.java 47.05% <50.00%> (+1.44%) :arrow_up:
.../iterable/iterableapi/IterableActivityMonitor.java 91.80% <0.00%> (-3.28%) :arrow_down:
...com/iterable/iterableapi/IterableInAppManager.java 88.09% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5350724...036fda7. Read the comment docs.

codecov[bot] avatar Mar 16 '22 00:03 codecov[bot]