Skip to content
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

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

Open
willianB opened this issue Sep 19, 2023 · 2 comments

Comments

@willianB
Copy link

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.

@riskpp
Copy link
Contributor

riskpp commented Sep 21, 2023

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

ikresicc added a commit that referenced this issue Sep 28, 2023
Merge in MML/infobip-mobile-messaging-android.wiki from ikresic-MM-5974-android-sdk-release-9.0.0-version-with-full-featured-in-apps to master

Squashed commit of the following:

commit 2c1c0694fac94cdb990c6c36941a04e13c1dc73c
Author: ikresic <[email protected]>
Date:   Thu Sep 28 15:57:44 2023 +0200

    - updated docs

commit 3b53d4d89af6b30f12b70a8683c1c38de79a4a0a
Author: ikresic <[email protected]>
Date:   Thu Sep 28 09:42:08 2023 +0200

    - updated docs

commit dc7b6f90f1afe9347a2dea1be2b3c0ac44493680
Author: ikresic <[email protected]>
Date:   Wed Sep 27 14:02:09 2023 +0200

    - updated docs

commit 4d3e792e780a8958899b382c3037e666c0424069
Author: ikresic <[email protected]>
Date:   Wed Sep 27 13:26:35 2023 +0200

    - updated version number

commit f556f4a2afaeb131a5f3ed702f038bec59920d7c
Author: ikresic <[email protected]>
Date:   Wed Sep 27 12:35:49 2023 +0200

    - updated version number

commit 33077538d4b603d10bc95b378c3ca65e9fee53a9
Author: ikresic <[email protected]>
Date:   Tue Sep 26 17:04:48 2023 +0200

    - updated version number

commit f6bf2de3fb66d282312efee9c03264ba0cf514cd
Author: ikresic <[email protected]>
Date:   Tue Sep 26 16:57:42 2023 +0200

    - updated docs about Full-featured In-Apps

commit 855666fa51b9aa144298e23f7fa4fb2f241c5307
Author: ikresic <[email protected]>
Date:   Tue Sep 26 16:54:10 2023 +0200

    - updated docs about Full-featured In-Apps

commit dd47280ced7ae16004e812a70e1c05eba44c0373
Author: ikresic <[email protected]>
Date:   Tue Sep 26 15:10:12 2023 +0200

    - updated docs about Full-featured In-Apps
@ikresicc
Copy link
Contributor

ikresicc commented May 9, 2024

Hello @willianB

I just wanted to check have this issue persisted on your side, and have you tried what @riskpp suggested?

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

No branches or pull requests

3 participants