I am new to Capacitor and ionic framework. I am trying to use FCM to trigger and deep link into my app. Following are the outputs:
Ios: App in background, foreground and killed state - when tap on push, pushNotificationActionPerformed listener is called properly.
Android: App in background and killed state - when tap on push, pushNotificationActionPerformed listener is called properly.
App in foreground- when tap on push, pushNotificationActionPerformed is never called, I can see pushNotificationReceived listener is called but I need to capture the tap from user to deep link them into certain page of my app. Basically, nothing happens when I try to tap on push.
Following is the code I have added till now: capacitor.config.json:
"PushNotifications": {
"presentationOptions": [
"badge",
"sound",
"alert"
]
}
AndroidManifest.xml:
<intent-filter>
<action android:name="MOBILE-PUSH-DEEP-LINK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Push payload:
{
"to": "FCM token",
"notification": {
"body": "test",
"title": "Dummy",
"click_action": "MOBILE-PUSH-DEEP-LINK"
},
"data": {
"data1": "test",
"data2": "12345",
}
}
Thanks in advance for your help!
Implemented the following solution till capacitor comes up with a proper update to deal with foreground push notifications.