Beispiel #1
0
        public override void OnReceive(Context context, Intent intent)
        {
            var notificationData = RemoteMessageUtils.ExtractNotificationData(intent);

            if (notificationData != null)
            {
                Log.Info(Tag, notificationData.DictionaryToString());
                string action = notificationData[NotificationConstants.Action];
                if (action == "Yes")//Custom action
                {
                    //If user clicks on "Yes" action
                    NotificationController.InvokeApp(context, intent.Extras.GetBundle(NotificationConstants.Notification));
                }
            }
        }
 public void InvokeApp(XamarinFormsPushDemo.HMSPush.Model.LocalNotification notification)
 {
     NotificationController.InvokeApp(Application.Context, NotificationToBundle(notification));
 }