feat: added ability to pause the in-app polling#927
Draft
Conversation
Sample app builds 📱Below you will find the list of the latest versions of the sample apps. |
SDK binary size reports 📊SDK binary size of this PRSDK binary size diff report vs. main branch |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #927 +/- ##
==========================================
+ Coverage 62.84% 63.86% +1.02%
==========================================
Files 166 166
Lines 7345 7387 +42
==========================================
+ Hits 4616 4718 +102
+ Misses 2729 2669 -60 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Ahmed-Ali
suggested changes
May 31, 2025
Contributor
Ahmed-Ali
left a comment
There was a problem hiding this comment.
Blocking this till we discuss it on Monday
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
We currently keep on polling for in-app messages weather user expects it or not, if a user wants to temporarily stop the networking requests for the session, they should have the ability to do so.
Summary
• Add
pauseMessageFetching()andresumeMessageFetching()API methods toMessagingInAppmodule for controlling in-app message fetching• Enable developers to temporarily stop and restart periodic message polling from the server
Test plan
pauseMessageFetching()dispatches correct action and stops making network requestsresumeMessageFetching()dispatches correct action and restarts making network requestsisMessageFetchingPausedpropertyHow to test
In the sample app, you can test the new polling control functionality:
pauseMessageFetching()behind the click the "Random Event" buttonresumeMessageFetching()behind the Click of "Custom Event" button