Skip to content

[MOB-9340] Fix for removing recalled campaigns from device memory #893

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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

sumeruchat
Copy link
Collaborator

Ticket: https://iterable.atlassian.net/browse/MOB-9340

ISSUE: In-App Messages Remain Visible After Server Recall

PROBLEM DESCRIPTION:
In-app messages continue to display on Android devices even after they've been recalled server-side. The SDK recognizes the recall event but fails to mark these messages as consumed locally, causing them to remain visible to users.

ROOT CAUSE:
During synchronization, the SDK correctly identifies messages that have been removed from the server (missing from server response but present in local storage)

FIX IMPLEMENTED:
Modified the syncWithRemoteQueue() method in IterableInAppManager.java to mark messages as consumed before removing them from storage when they're no longer present in the server response.

The changes are minimal and targeted, similar to the iOS fix. Added unit test to verify the fix works correctly.

…val- Ensure in-app messages are marked as consumed before being removed from local storage to prevent re-display.- Add unit test to verify that recalled messages are correctly marked as consumed and inAppConsume is called.
@sumeruchat sumeruchat changed the title [MOB-9340] Fix for recalled in-app campaigns [MOB-9340] Fix for removing recalled campaigns from device memory Mar 27, 2025
sumeruchat and others added 10 commits March 27, 2025 18:16
…ter message removal in `IterableFirebaseMessagingService`.- Mark messages as consumed before removal in `IterableInAppManager` to prevent re-display.
…Central, upgrade Kotlin to 1.9.22, and configure JVMtoolchain to 17. Refactor javadoc task for compatibility with new Android Gradle Plugin.
…or message retrieval- Replaced array with Arrays.asList for better readability and flexibility.- Added missing import for Arrays.
…n-app messages are marked as consumed through the API before being removed from storage to prevent re-display.
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.

Added suggestions

Comment on lines +24 to +27
buildFeatures {
buildConfig true
}

Copy link
Member

Choose a reason for hiding this comment

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

Lets remove all the build and embedded related changes from this PR

storage.removeMessage(localMessage);
api.inAppConsume(localMessage, null, null, null, null);
Copy link
Member

Choose a reason for hiding this comment

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

Lets get a confirmation from product to see if recalled message should be consumed. As it could affect the analytics.
Also referencing localMessage after its removal could cause problems.

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.

2 participants