void OnIncomingPayloadReceived(object sender, PushNotificationReceivedEventArgs e) { try { Logger.Instance.WriteLine("\n\nIncoming push notification received"); Logger.Instance.WriteLine($"Title: {e.Title}"); Logger.Instance.WriteLine($"Message: {e.Message}"); if (e.CustomData != null) { foreach (var p in e.CustomData) { Logger.Instance.WriteLine($"{p.Key} : {p.Value}"); } } AppNotificationReceived?.Invoke(this, e); } catch (Exception ex) { Logger.Instance.WriteLine(ex); } }
void OnNotificationReceived(object sender, NotificationEventArgs e) { AppNotificationReceived?.Invoke(this, e); }