i am not receiving notification after sending it through firebase console , i tried sending many notification but received one or two from around 20 notifications, i followed this guide firebase messaging from github ,why am i not receiving notification, my app is installed in one emulator and in one of my phone but when i receive notification which i have sent through notification panel i get them either on phone or emulator never got them on both.
-
2(cool name) how are you checking for the notifications, note that when the app is in the foreground no notification will be generated. – Arthur Thompson Jul 19 '16 at 20:52
-
Your screen looks like mine. It seem it wont be working right as one would expect. I was like you too frustrated. then when to gym and I saw it working when I got back. so I would say let it settle down (provided you followed docs as it is) – Alok C Aug 04 '16 at 18:22
7 Answers
check your android app configuration in firebase console
use a restful client to make the request, i suggest chrome-extension://aejoelaoggembcahagimdiliamlcdmfm/dhc.html, there you can see the response of the request, if your request are sent sucessfully or if you have error, and the response tells what kind of error you have
check android app , in the method onMessageReceived and print everything to see if you receive information, besides you can print the property "from" who is the id_number of your proyect, and you can see if the messages come from your firebase android app
check firebase documentation. I've implemented everything just with the guides and its working pretty well

- 4,352
- 5
- 30
- 42

- 427
- 5
- 11
I solved the same problem.
The problem seems to be the browser compatibility/version. Mozilla Firefox could easily handle this.
Make sure your app is running in the background.
Open the Firebase notification console in the FireFox browser and send notifications.

- 9,564
- 146
- 81
- 122

- 1,445
- 16
- 27
-
1Thank you! I have just wasted half a day on debugging why I wasn't getting notifications sent from Safari. Chrome (no big surprise) works just fine – redPanda Dec 06 '18 at 19:55
-
-
Make sure token is generated
FirebaseInstanceId.getInstance().getToken();

- 8,767
- 15
- 58
- 114

- 450
- 7
- 9
in my case, the package name defined at firebase console isn't the same as defined on gradle and manifest of the app (i changed it one time in the app), so the app won't be able to receive notifications sent from firebase console. They both have to be the same!
I did not add a new firebase project, just go to project settings at console and add new android app with another package name and have a look at the newly generated google-services.json and change some lines at you android studio project.

- 139
- 4
Besides the tips that Pavul Zavala
said ، keep this in mind that just data message can received by FirebaseMessagingService
even application closed or run in background and notification message
can't handle(till this moment) when application run in background.
And all message that sent via FireBase console
Contains , they always include a notification key
more detail at : Push notification works incorrectly when app is on background or not running
In my case, what helped me is creating a new simulator in Android Studio
Few things to check:
in Firebase console https://console.firebase.google.com/ add/configure the project
in Android Studio connect to Firebase - Manu -> Tolls -> Firebase -> Cloud Messaging (Connect, Add FCM to your app)
Send notification from Firebase console
So, again, I recreated Virtual Device (open AVD manger and create the same device with the same API level)
I will be happy if somebody will save the time using this post :)

- 3,196
- 24
- 19
Ideally it shouldn't behave like that but it might be due to following reasons:
- Check the notification priority of your app in the app settings of the device.
- You might be sending the token of one particular device, Your target should be User segment.

- 403
- 4
- 14