mobile-messaging-sdk-android icon indicating copy to clipboard operation
mobile-messaging-sdk-android copied to clipboard

infobip android re-synchronizes push notifications when I logout in my app

Open willianB opened this issue 9 months ago • 2 comments

Hello! When I send a notification from the infobip website it arrives fine, but when I logout it comes back and shows the notification that previously arrived. Reviewing I see that it is because of the intent that runs when I logout in my app, which is as follows:

new Intent(activity, SplashActivity.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);

This immediately executes MobileMessagingSynchronizationReceiver with the onReceive method, which synchronizes the push notification messages.

How can I disable this feature so that I can logout normally without it syncing again? Thanks in advance.

willianB avatar Sep 19 '23 16:09 willianB