internal static void onSentNotification(iOSNotificationData data)
        {
            var notification = new iOSNotification(data.identifier);

            notification.data = data;
            onNotificationReceived(notification);
        }
        internal static void OnReceivedRemoteNotification(iOSNotificationData data)
        {
            var notification = new iOSNotification(data.identifier);

            notification.data = data;
            s_OnRemoteNotificationReceived(notification);
        }
Beispiel #3
0
        /// <summary>
        /// Schedules a local notification for delivery.
        /// </summary>
        /// <param name="notification">Notification to schedule</param>
        public static void ScheduleNotification(iOSNotification notification)
        {
            if (!Initialize())
            {
                return;
            }

            iOSNotificationsWrapper.ScheduleLocalNotification(notification.GetDataForSending());
        }
        /// <summary>
        /// Schedules a local notification for delivery.
        /// </summary>
        public static void ScheduleNotification(iOSNotification notification)
        {
            if (!Initialize())
            {
                return;
            }

            iOSNotificationsWrapper.ScheduleLocalNotification(notification.data);
        }
Beispiel #5
0
        private static iOSNotification[] NotificationDataToNotifications(iOSNotificationWithUserInfo[] notificationData)
        {
            var iOSNotifications = new iOSNotification[notificationData == null ? 0 : notificationData.Length];

            for (int i = 0; i < iOSNotifications.Length; ++i)
            {
                iOSNotifications[i] = new iOSNotification(notificationData[i]);
            }

            return(iOSNotifications);
        }
        /// <summary>
        /// Use this to retrieve the last local or remote notification received by the app.
        /// </summary>
        /// <returns>
        /// Returns the last local or remote notification used to open the app or clicked on by the user. If no notification is available it returns null.
        /// </returns>
        public static iOSNotification GetLastRespondedNotification()
        {
            var data = iOSNotificationsWrapper.GetLastNotificationData();

            if (data == null)
            {
                return(null);
            }

            var notification = new iOSNotification(data.Value.identifier);

            notification.data = data.Value;

            return(notification);
        }
Beispiel #7
0
        internal static void OnSentNotification(iOSNotificationWithUserInfo data)
        {
            var notification = new iOSNotification(data);

            s_OnNotificationReceived(notification);
        }
Beispiel #8
0
        internal static void OnReceivedRemoteNotification(iOSNotificationData data)
        {
            var notification = new iOSNotification(data);

            s_OnRemoteNotificationReceived(notification);
        }