iterable-android-sdk
iterable-android-sdk copied to clipboard
Checking duplicate messageIds before showing push
trafficstars
🔹 Jira Ticket(s) if any
Hack Week - Avoid showing duplicate push messages
✏️ Description
- Comma seperated message Ids stored in shared preference
- Arraylist implementation where New messageIds added at last and removed from index0 to keep size less than 10
- All this functionality is clubbed into the new method:
isDuplicateMessageIdwhich now returns true if messageId duplicate is found. Else returns false where it successfully stores the last push messageId.
Remaining:
- Call trackDuplicate Api call when return value of true is returned from this new method.
- return false and do not proceed with showing the notification and discard the notification object created so far
Codecov Report
Merging #439 (66ec5cc) into master (bc1de3e) will decrease coverage by
0.36%. The diff coverage is36.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 dataPowered by Codecov. Last update 5350724...036fda7. Read the comment docs.