Goodmorning everyone, I haven't been able to find a solution for several hours now.
I use the "PushNotifications" Capacitor plugin (https://capacitor.ionicframework.com/docs/apis/push-notifications/) to listen to push notifications that come to me from firebase (both notification and data type), the listening of notifications happens very well and everything behaves as expected even in cases of app killed or in the background.
The problem is the following:
I want to open the app when I receive a notification, if it is in the background or if it has been killed.
In the case of notification received when the app is in the foreground, I can run custom code using
addListener(eventName: "pushNotificationReceived", callback)
and in any case I have no problems because the app is open.In case of notification received when the app is in the background, I can force the app to keep the backgroundMode active (https://ionicframework.com/docs/native/background-mode) and bring the app to the foreground upon receiving a notification. (although I don't really like it because it's battery consuming)
In case of app killed, I have not found solutions to the problem.
It seems that there is no way to hook custom code to be able to run when a push notification arrives when it is received in the background or with the app killed, have you ever had this problem?
Thank you!