3

I use FCM API push notification for my Android app. When my app is running on foreground and background, it's fine, but when my app is closed, I don't receive any notification from FCM.

I need a solution for this problem, like Gmail app. It can receive notifications when app is closed or killed.

AL.
  • 36,815
  • 10
  • 142
  • 281
HoangLT
  • 41
  • 3

1 Answers1

-4

You need to override onMessageReceived() of FCM.

you can read more details : https://firebase.google.com/docs/cloud-messaging/android/receive

Naitik
  • 796
  • 11
  • 32
  • Naitik: Thank for your answer. I was override onMessageReceived(), and my add active good on foreground and background, but when my app is closed or killed I don't receive notification. Somethings like Gmail can push notifycation when app is closed – HoangLT Dec 21 '16 at 06:56
  • You can check further details at given link at end of the page. – Naitik Dec 21 '16 at 13:48