Home > database >  Why Firebase push notification work only when App is closed
Why Firebase push notification work only when App is closed

Time:12-07

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>

CodePudding user response:

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

  • Related