Receiving the FCM notifications multiple times on Nougat

前端 未结 2 505
遥遥无期
遥遥无期 2020-12-21 09:41

I am using Firebase push notifications in my app. But when I am sending a notification for some event, I am getting notification\'s multiple times after 2-3 minutes on

2条回答
  •  感情败类
    2020-12-21 10:01

    Same thing was happening on me , I tried everything only in vain

    Then i realised we were storing all fcm tokens of the android device from start till finish without validating or deleting them

    I deleted all fcm tokens and re-logged in my app which inserted a fresh singular token in FCM tokens list in my server's db

    It worked fine, I think FCM should invalidate earlier tokens before issuing new ones even across installs , multiple apks, and multiple apk debug sessions

    Try to send to only 1 token , also clean build and reinstall your app

提交回复
热议问题