Closed ariona closed 4 years ago
It's working now. had to check for additionalData payload first before running some actions :
OneSignal.shared.setNotificationOpenedHandler((OSNotificationOpenedResult result) {
if (result.notification.payload.additionalData.isNotEmpty) {
var data = result.notification.payload.additionalData;
print(data["amount"]);
}
});
Description:
All action inside
setNotificationOpenedHandler
are not getting called when user click on notification both when the app in foreground and on closed state.Below is the code i used, to handle
setNotificationOpenedHandler
:The only logged data is from the library which is:
Environment
Device Info
Steps to Reproduce Issue: