public override string ScheduleLocalNotification (CrossPlatformNotification _notification)
		{
			// Append notification id to user info
			string _notificationID				= _notification.GenerateNotificationID();
			
			// Assign notification data
			LocalNotification _newNotification	= new LocalNotification();
			_newNotification.alertBody			= _notification.AlertBody;
			_newNotification.fireDate			= _notification.FireDate;
			_newNotification.repeatInterval		= iOSNotificationPayload.ConvertToCalendarUnit(_notification.RepeatInterval);
			_newNotification.userInfo			= _notification.UserInfo;
			
			// iOS Notification additional data
			CrossPlatformNotification.iOSSpecificProperties _iOSProperties	= _notification.iOSProperties;
			
			if (_iOSProperties != null)
			{
				_newNotification.hasAction					= _iOSProperties.HasAction;
				_newNotification.applicationIconBadgeNumber	= _iOSProperties.BadgeCount;
				
				if (!string.IsNullOrEmpty(_iOSProperties.AlertAction))
					_newNotification.alertAction		= _iOSProperties.AlertAction;
				
				if (!string.IsNullOrEmpty(_iOSProperties.LaunchImage))
					_newNotification.alertLaunchImage	= _iOSProperties.LaunchImage;
				
				if (!string.IsNullOrEmpty(_iOSProperties.SoundName))
					_newNotification.soundName			= _iOSProperties.SoundName;
			}

			// Schedule notification
			NotificationServices.ScheduleLocalNotification(_newNotification);
			return _notificationID;
		}
        /// <summary>
        /// Schedules a local notification for delivery at specified date and time.
        /// </summary>
        /// <returns>A string used to uniquely identify the scheduled notification.</returns>
        /// <param name="_notification">The local notification object that you want to schedule.</param>
        /// <remarks>
        /// \note Prior to scheduling any local notifications, you must call the <see cref="RegisterNotificationTypes"/> method if you want system to display alerts, play sounds etc.
        /// </remarks>
        public string ScheduleLocalNotification(CrossPlatformNotification _notification)
        {
            string _notificationID = _notification.GenerateNotificationID();

            m_platform.ScheduleLocalNotification(_notification);

            return(_notificationID);
        }
        public override string ScheduleLocalNotification(CrossPlatformNotification _notification)
        {
            // Append notification id to userinfo
            string _notificationID = _notification.GenerateNotificationID();

            // Scheduling new notification
            m_notificationCenter.ScheduleLocalNotification(_notification);

            return(_notificationID);
        }
		public override string ScheduleLocalNotification (CrossPlatformNotification _notification)
		{
			// Append notification id to userinfo
			string _notificationID	= _notification.GenerateNotificationID();

			// Scheduling new notification
			m_notificationCenter.ScheduleLocalNotification(_notification);

			return _notificationID;
		}
		public override string ScheduleLocalNotification (CrossPlatformNotification _notification)
		{
			// Append notification id to user info
			string _notificationID	= _notification.GenerateNotificationID();
			string _payload			= iOSNotificationPayload.CreateNotificationPayload(_notification).ToJSON();

			// Schedule notification
			scheduleLocalNotification(_payload);

			return _notificationID;
		}
        public override string ScheduleLocalNotification(CrossPlatformNotification _notification)
        {
            // Append notification id to user info
            string _notificationID = _notification.GenerateNotificationID();
            string _payload        = iOSNotificationPayload.CreateNotificationPayload(_notification).ToJSON();

            // Schedule notification
            scheduleLocalNotification(_payload);

            return(_notificationID);
        }
        public override string ScheduleLocalNotification(CrossPlatformNotification _notification)
        {
            string _notificationID = _notification.GenerateNotificationID();

            // Create meta info and pass to native
            IDictionary _payLoadInfo = AndroidNotificationPayload.CreateNotificationPayload(_notification);

            // Scheduling notification
            Plugin.Call(NativeInfo.Methods.SCHEDULE_LOCAL_NOTIFICATION, _payLoadInfo.ToJSON());

            return(_notificationID);
        }
		public override string ScheduleLocalNotification (CrossPlatformNotification _notification)
		{
			string _notificationID		= _notification.GenerateNotificationID();

			// Create meta info and pass to native
			IDictionary _payLoadInfo	= AndroidNotificationPayload.CreateNotificationPayload(_notification);

			// Scheduling notification
			Plugin.Call(NativeInfo.Methods.SCHEDULE_LOCAL_NOTIFICATION, _payLoadInfo.ToJSON());
			
			return _notificationID;
		}
Exemple #9
0
        public override string ScheduleLocalNotification(CrossPlatformNotification _notification)
        {
            // Append notification id to user info
            string _notificationID = _notification.GenerateNotificationID();

            // Assign notification data
            LocalNotification _newNotification = new LocalNotification();

            _newNotification.alertBody      = _notification.AlertBody;
            _newNotification.fireDate       = _notification.FireDate;
            _newNotification.repeatInterval = iOSNotificationPayload.ConvertToCalendarUnit(_notification.RepeatInterval);
            _newNotification.userInfo       = _notification.UserInfo;

            // iOS Notification additional data
            CrossPlatformNotification.iOSSpecificProperties _iOSProperties = _notification.iOSProperties;

            if (_iOSProperties != null)
            {
                _newNotification.hasAction = _iOSProperties.HasAction;
                _newNotification.applicationIconBadgeNumber = _iOSProperties.BadgeCount;

                if (!string.IsNullOrEmpty(_iOSProperties.AlertAction))
                {
                    _newNotification.alertAction = _iOSProperties.AlertAction;
                }

                if (!string.IsNullOrEmpty(_iOSProperties.LaunchImage))
                {
                    _newNotification.alertLaunchImage = _iOSProperties.LaunchImage;
                }

                if (!string.IsNullOrEmpty(_iOSProperties.SoundName))
                {
                    _newNotification.soundName = _iOSProperties.SoundName;
                }
            }

            // Schedule notification
            NotificationServices.ScheduleLocalNotification(_newNotification);
            return(_notificationID);
        }