1

I am using Firebase notifications in my application. I have performed all steps mentioned in firebase documentaton. I can also receive the registration token inside onTokenRefresh() method. But when I try to send message to my device from Firebase Notification console, It shows status as 'Completed' next to message, but I don't receive anything on my device even when app is in background.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
rohit
  • 19
  • 2

2 Answers2

0

(copy paste from my other answer)

I had this exact problem, the device behavior was somehow weird. some notifications were received, some not.

In the end I found out what was wrong. My device's Sync setting was off. please check that first and don't waste your time like me. enter image description here

Soorena
  • 4,352
  • 5
  • 30
  • 42
-1

You need to call private void sendNotification(String topic); method from Overriden method public void onMessageReceived(RemoteMessage remoteMessage). then your notification will added to notification bar.

Happy Coding.

Srini Vasu
  • 37
  • 6
  • 2
    I have implemented private void sendNotification(String messageBody). But I expect to receive notification insystem tray when app is in background as I am sending notifications from notification console. – rohit Jul 19 '16 at 12:02