I opened project in firebase and set the file google-services.json in app directory...
i set SENDER ID on the configure
and when i send message in firebase console - Compose message nothing happend...
what i need to do?
i working with android and RN > 0.30
i've got the same problem but only when my app is 'active'. When my app is in background the notification shows up.
In both app states the onNotification function is not running.
@kfir91 @jk94
Please advise if PushNotification.configure({onRegister}) fires in your apps.
It doesn't in my.
What configuration differences are for Firebase in difference to GCM?
The problem was that I ignored to include entries in manifest.
Now it is firing! But each time app starts.
Is it correct to run register method each time app starts?
I agree with @jk94 that push notification doesn't arrive when app is "dead"(not in background)
Pushes only arrive when app is in background (not foreground)
Ok, so finally I can conclude that push notifications arrive in "dead" and background modes but do not arrive in foreground (method onNotification doesn't fire).
_In my case notifications in "dead" mode notifications didn't arrive because firmware of my Redmi Note 3 has extra autorun configurations. I had to add app to autorun inclusions._
@anray Did you try to send a messages from this https://console.firebase.google.com/project/YourAppName/notification/compose form and all is working?
I got a token from trigger onRegister. And when send a message from that form - nothing is happen. Tried to do it with connected by usb device and app on it in background or active. Nothing arrive even if in firebase console status is Completed
I was expected that remote notifications will be displayed on a screen, lol)
@zalesky, i encountering same issue as yours, im firing using firebase console.. i can see my token on my mobile device,, but nothing is received, the onNotification is not called on my mobile device. have u solved your issue?
@vvavepacket, it works for me, try to set debugger to your onNotification function and it must fire
@what was your issue before why the function is not fired before? I set a debugger on the onNotification, but it is not fired. Does the token contains a colon symbol like yours?

I tried firing a local notification and it worked... but remote notifications from firebase doesn't work.. May I see a copy of your AndroidManifest.xml?
@zalesky i tried this service:
it worked,, but why is that when I tried firebase console, it doesnt work?
I have the same issue here.
The onRegister function is called and I have a token for my device, but nothing happend when I send a message from the Firebase console.
I tried with 2 different devices, with the app in the foreground and in the background.
Local notifications works fine.
@AdrienKuhn got the same issue here. Setup iOS first, everything worked. Got onRegister and onNotification callbacks. On Android, I also get a device token with the onRegister callback but when I send a notification via the firebase console, nothing arrives... Not in the foreground, not in the background, just nothing.
Did you manage to solve the problem?
@wwwdata I was able to bypass Firebase with a curl command:
curl -X POST \\n https://android.googleapis.com/gcm/send \\n -H 'authorization: key={authorization_key}' \\n -H 'cache-control: no-cache' \\n -H 'content-type: application/json' \\n -d '{ \n "registration_ids":["{registration_id}"],\n "data": {\n "body": "Hello World"\n }\n}'
I cannot send push notifications from firebase to a single device. The token received onRegistration is actually the token from APNS and not firebase.
Does anyone know how to do it ?
I'm in the same boat. I have a working iOS push notification version and want to make the same with Android.
The onRegister() is never fired, no matter what I'm doing. Also is some articles, like this one, they're talking about firebase.messaging().hasPermission(). I'm wondering if this package's documentation is up-to-date 馃.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.