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

ScheduleLocalNotification() private method

private ScheduleLocalNotification ( LocalNotification notification ) : void
notification LocalNotification
return void
        public static extern void ScheduleLocalNotification(LocalNotification notification);
        /// <summary>

Usage Example

コード例 #1
0
        // Call by main game OnApplicationPause
        public void ScheduleReturnBackToGameNotification()
        {
#if UNITY_ANDROID
            NotificationParams notification = new NotificationParams
            {
                Id             = NotificationIdHandler.GetNotificationId(),
                Ticker         = "Ticker",
                Sound          = true,
                Vibrate        = true,
                Light          = true,
                LargeIcon      = "app_icon",
                SmallIcon      = NotificationIcon.Heart,
                SmallIconColor = new Color(0, 0.5f, 0),
                CallbackData   = "ScheduleReturnBackToGameNotification", // name of method

                Delay   = TimeSpan.FromSeconds(inactiveLatelyNotificationDelayInSeconds),
                Title   = androidAppTitle,
                Message = inactiveLatelyMessage
            };
            NotificationManager.SendCustom(notification);
#elif UNITY_IOS
            LocalNotification notification = new LocalNotification
            {
                applicationIconBadgeNumber = 1,
                alertBody = inactiveLatelyMessage,
                fireDate  = DateTime.Now.AddSeconds(inactiveLatelyNotificationDelayInSeconds),
                soundName = LocalNotification.defaultSoundName
            };
            NotificationServices.ScheduleLocalNotification(notification);
#endif
        }
All Usage Examples Of UnityEngine.iOS.NotificationServices::ScheduleLocalNotification