I am integrating FireBase Push Notification into my application. Although I am receiving push notifications(when application is in background) but my onMessageReceived(RemoteMessage remoteMessage) is never called, independent of whether application is in foreground or backgroud. If its the issue with FCM or there is something that I am doing wrong. I am using 'com.google.firebase:firebase-messaging:9.0.0' in my app build.gradle. I have declared both the services in my application manifest
<service
android:name="app.pnd.camscanner.MyFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<service
android:name="app.pnd.camscanner.MyFirebaseInstanceIDService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>