Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 void OnNotificationReceived(object sender, NotificationEventArgs e)
 {
     AppNotificationReceived?.Invoke(this, e);
 }