UnityEngine.iOS.NotificationServices.ClearLocalNotifications C# (CSharp) Method

ClearLocalNotifications() private method

private ClearLocalNotifications ( ) : void
return void
        public static extern void ClearLocalNotifications();
        /// <summary>

Usage Example

コード例 #1
0
        private void Update()
        {
            // no point checking if we don't have a device token yet
            if (this.deviceToken == null)
            {
                return;
            }

            this.currentQueryTime += Time.deltaTime;

            // early out if haven't met the query time
            if (this.currentQueryTime < QueryTimerMax)
            {
                return;
            }

            // reset timer
            this.currentQueryTime = 0.0f;

            // https://forum.unity3d.com/threads/using-the-new-notification-system.127016/
            if (NotificationServices.remoteNotificationCount != 0)
            {
                // iterating over all the remote notifications
                for (int i = 0; i < NotificationServices.remoteNotificationCount; i++)
                {
                    this.pushHandler.ReceivedPushNotification(NotificationServices.GetRemoteNotification(i).alertBody);
                }

                // clear all messages
                NotificationServices.ClearRemoteNotifications();
                NotificationServices.ClearLocalNotifications();
            }
        }
All Usage Examples Of UnityEngine.iOS.NotificationServices::ClearLocalNotifications