0

I don't receive any notification when my application is open. Is this normal? I just receive push notifications when my app is closed. My service is:

<service
     android:name=".FirebaseNotificationService"
     android:exported="false">
     <intent-filter>
        <action android:name="com.google.firebase.MESSAGING_EVENT"/>
      </intent-filter>
</service>
Cipri
  • 57
  • 1
  • 9
  • 1
    I guess you are sending the notification from Firebase console, if it the case then yes. it's normal. check this: https://firebase.google.com/docs/cloud-messaging/android/receive – Mostafa Onaizan Dec 05 '22 at 21:30
  • if you want your app to receive notification on both way you have to send notification data from your server or serverless function. – Mostafa Onaizan Dec 05 '22 at 21:31

1 Answers1

0

This is working as intended. Messages received when in foreground will be handled in onMessageReceived(). Similar post answered here.

Gerardo
  • 3,460
  • 1
  • 16
  • 18
Yuji Bry
  • 304
  • 8