mobile-messaging-sdk-android
mobile-messaging-sdk-android copied to clipboard
infobip android re-synchronizes push notifications when I logout in my app
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.
Hello @willianB,
when I logout it comes back and shows the notification that previously arrived.
- If notification arrived and was delivered it shouldn't come again, so this sounds weird that
MobileMessagingSynchronizationReceiver
again receives the same message, may be you have some specific logic (for ex. another push provider) so message wasn't properly handled by MobileMessaging SDK? - if your app has logout/login logic this document about personalization/depersonalization might help you
Hello @willianB
I just wanted to check have this issue persisted on your side, and have you tried what @riskpp suggested?