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.
Asked
Active
Viewed 1,186 times
1
-
Could you clarify what you mean by "I don't receive anything", what do you expect? – Arthur Thompson Jul 19 '16 at 20:56
-
Apparently there was a mistake in my manifest file.I had added same action in both(FirebaseMessagingService and FirebaseInstanceIdService). while looking closely I got it. thanks for help anyway. – rohit Jul 20 '16 at 11:46
-
Happy you got it working. – Arthur Thompson Jul 20 '16 at 16:22
2 Answers
-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
-
2I 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