Basel JD
Basel JD

Reputation: 275

Firebase Messaging Android Notification not received when app is open

I configured my Android app as the Firebase docs and I am receiving notifications normally, however when the app is in the foreground I do not get any notifications. Is there a way to get the notifications even if the app is in the foreground.

Upvotes: 1

Views: 2795

Answers (1)

hiten pannu
hiten pannu

Reputation: 186

if you have done all the steps as given in the docs then when your app is in foreground your "sendNotification()" is not called, which is responsible for showing the notification. If you want notification when app is in foreground then just sendNotification() inside the onMessageReceived()

for more check this link https://github.com/firebase/quickstart-android/blob/master/messaging/app/src/main/java/com/google/firebase/quickstart/fcm/MyFirebaseMessagingService.java

Upvotes: 1

Related Questions