Push Notification being sent twice

1,859 views
Skip to first unread message

Julio Silva

unread,
Sep 11, 2017, 9:11:49 AM9/11/17
to android-gcm
Hello, folks. I'm currently using AWS SNS for publishing push notifications, through FCM.

Any notifications sent are received twice: one with the right icon (the app's svg) and color, and another with just the message and a square white block for an icon.

I've tracked those messages down on the console, and the duplicate doesn't have the app's package id ("com.mysite...") attached, just an "n/d" value.

The registration id/token for the endpoint: c1YuzlGtDuY:APA91bGqXFQ2umXoIDR6WyR6B3km3kLIGjpxV0pp7ehlg_KeaWR6cfHJbH08lNLS5Mum3AKWsnDRpzirs2ZiuN6NS_3FMT2WFqytYtOkssw4W700VcUA1Un9SBJADmCDTUQH6Nm-Ay80

Correct notification "message code": 0:1505133782083940%b45a4be4b45a4be4

Unconfigured notification "message code": 0:1505134239330928%b45a4be4f9fd7ecd

Thank you all in advance for the attention.

Diego Giorgini

unread,
Sep 13, 2017, 3:54:24 AM9/13/17
to android-gcm
How did you obtain the two messages id ?
From your description I strongly suspect it's a client app or configuration problem.

The notification with "a square white block for an icon" is likely the notification generated automatically by GCM or FCM.
(the white square is actually your icon in black & white)

Things you should check:
1. you are including only GCM or FCM, not both
2. your manifest only has 1 broadcast receiver for com.google.android.c2dm.intent.RECEIVE in the manifest
(if you are using FCM this broadcast receiver is automatically added by the library, you should not add it yourself)
3. check the logic in onMessageReceived(...)

also: test it by sending the message using the FCM api (with CURL or Postman) instead of using AWS SNS

--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-gcm...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-gcm/942dc533-2c5b-4559-867e-d00e7347bdf0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

kendrick....@gmail.com

unread,
Feb 28, 2019, 5:52:14 PM2/28/19
to android-gcm
Hello, I encountered the same problem as well. Have you solved it?
I tried sending through Firebase Console and I got 1 notification instead of 2. But when I send it through SNS, I always got 2 notifications
Reply all
Reply to author
Forward
0 new messages