We have integrated chat in our product for Android app & Web Portal. If we send the message from portal we need display the push notification on the Android app.
The push notification is getting displayed when application is killed or background/ not visible (i.e. by pressing device home button).
But the push notification is not getting received when the app in foreground/ visible. The below mentioned method which is overridden by extending the com.google.firebase.messaging.FirebaseMessagingService.class
@Override
public void onMessageReceived(@NotNull RemoteMessage remoteMessage) {
}
but it is not getting called, When the android application is in foreground/visible.