-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I track the opening of app by clicking on a notification? #19
Comments
@ValdZX @mirzemehdi |
I think this is more about adding deeplink support to library. But I am still checking my options |
This is implemented in library version This is how you can use it: Detecting notification click and get payload dataNotifierManager.addListener(object : NotifierManager.Listener {
override fun onNotificationClicked(data: PayloadData) {
super.onNotificationClicked(data)
println("Notification clicked, Notification payloadData: $data")
}
}) You need to call below platform-specific functions in order to receive payload data properly. AndroidCall override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
NotifierManager.onCreateOrOnNewIntent(intent)
...
}
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
NotifierManager.onCreateOrOnNewIntent(intent)
}
iOSCall
For more detailed information you can check PR #20 |
Please, let me know if there is any issue |
On my side (ios impl) |
@emanuelecastelli yes, when I click notification I get listener callback.
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) async -> UIBackgroundFetchResult {
NotifierManager.shared.onApplicationDidReceiveRemoteNotification(userInfo: userInfo)
return UIBackgroundFetchResult.newData
} |
i have done everything. |
@mirzemehdi can you provide json body that you use for test push notifications? {
"message": {
"token": ".......",
"notification": {
"title": "title",
"body": "Notification from FCM"
},
"apns": {
"headers": {
},
"payload": {
}
}
}
} |
Ok, restoring FCM method swizzling resolve the issue: push notifications callbacks now runs correctly |
Hi, how can i detect that user clicked on notification?
I need that when I click on a notification, a screen will open depending on the data in the notification.
The text was updated successfully, but these errors were encountered: