NotificationTapped not working in Killed State #471
Replies: 7 comments
-
|
Hi, are you calling |
Beta Was this translation helpful? Give feedback.
-
|
Hi, I am calling |
Beta Was this translation helpful? Give feedback.
-
|
Any update regarding this? |
Beta Was this translation helpful? Give feedback.
-
|
No, handling the notification tap should function correctly, irrespective of the app's state. Could you please provide a small sample project, that demonstrates the issue? |
Beta Was this translation helpful? Give feedback.
-
|
Hi! Enclosed, please find a simple modification of Coop-Tim sample (feature/adame branch with 3.0.0 plugin). It is limited to Android only, and needs adjusting google-services.json and ApplicationId in csproj and in AndroidManifest.xml I ran the app on mobile device and sent test notifications directly from Firebase console. I tried several test paths, each with different app behaviour:
It looks that somehow when notification appears on device, it remembers the current state of the app (?) Why there is such an inconsistent behaviour? |
Beta Was this translation helpful? Give feedback.
-
|
I'm also running into this on Android and iOS; I'm calling the OnNewIntent methods in the two places mentioned and wiring up to it in my MainPage codebehind and not having the method fire. |
Beta Was this translation helpful? Give feedback.
-
|
Finally, I figured how it works. If the app is alive, title and body in FCMNotification in both NotificationReceived and NotificationTapped came from "notification" part of the message. If the app is in killed state, there is no NotificationReceived event and param of NotificationTapped is filled from "data" part of the message - if it contains "title" and "body" fields. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using NotificationTapped in App.cs after InitializeComponent();
but NotificationTapped not invoking in any states.
Issue:
When i tap on notification in background and foreground state it redirect user to specific page using OnNewIntent, but in killed state it's not working. In killed state Intent is empty it just open app but not redirect user to specific page.
Beta Was this translation helpful? Give feedback.
All reactions