Open lorenzodianni opened 6 days ago
I can confirm this behaviour. coldstart
is false if the app is closed when a push notification for the app is clicked.
@lorenzodianni @geoidesic I pushed PR #319, which should resolve the issue where coldstart
is always false
.
The root cause appears to be that when the app becomes active and launchNotification
is set, the notificationMessage
property is updated to match launchNotification
. However, isInline
and coldstart
are also reset to NO
before the message is processed in the notificationReceived
method.
The notificationReceived
method is responsible for creating the JSON object that is returned to the front end.
By the time the process reaches notificationReceived
, the native properties isInline
(foreground
) and coldstart
(coldstart
) have already been reset. As a result, they always return false
.
Bug Report
After updating from version 4 to 5, the "coldstart" property is always set to false, even when I tap on the notification while the app is closed.
Expected Behaviour
The coldstart property should be set to true if the notification is tapped while the app is closed.
Actual Behaviour
Tapping the notification while the app is closed, coldstart is always set to false.
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
iOS 18
cordova info
PrintoutSample Push Data Payload - NotificationEventResponse
Sample Code that illustrates the problem
Logs taken while reproducing problem