You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Immediately after invoking OneSignal.Default.Initialize(), we wireup delegates for NotificationWillShow and NotificationOpened, however I'm only seeing NotificationOpened being invoked when I send test push notifications to my device from the portal. Shouldn't I see NoficationWillShow invoked first (and then NotificationOpened when the user taps on the notification)? This happens on both Android and iOS. Am I doing something wrong?
I have attached our debug log. At the bottom of the log, you can see that my delegate for the NotificationOpened event was invoked. So this means that the notification appears without first invoking the NotificationWillShow delegate.
After some experimentation, it seems that the NotificationWillShow delegate only gets invoked when the app is already running and is in the foreground at the moment that the push notification is received. Is this the intended behavior for that delegate? What I need is a delegate that gets invoked every time a notification is received. I want to use it to decide whether the notification will be shown on-screen. Does such a thing exist? Using the latest version 4.3.5 of your package.
How can we help?
Immediately after invoking OneSignal.Default.Initialize(), we wireup delegates for NotificationWillShow and NotificationOpened, however I'm only seeing NotificationOpened being invoked when I send test push notifications to my device from the portal. Shouldn't I see NoficationWillShow invoked first (and then NotificationOpened when the user taps on the notification)? This happens on both Android and iOS. Am I doing something wrong?
public void Initialize(string appId) { #if DEBUG OneSignal.Default.LogLevel = LogLevel.VERBOSE; #endif OneSignal.Default.Initialize(appId); OneSignal.Default.NotificationWillShow += OneSignal_NotificationWillShow; OneSignal.Default.NotificationOpened += OneSignal_NotificationOpened; }
Code of Conduct
The text was updated successfully, but these errors were encountered: