예제 #1
0
 public void CancelAll()
 {
     #if UNITY_ANDROID
     NotificationManager.CancelAll();
     #elif UNITY_IOS
     CancelSceuuleIOSNotification();
     #endif
 }
예제 #2
0
 public void CancelAll()
 {
     //cancels everything, and tells repeating button to go to red;
     NotificationManager.CancelAll();
     PlayerPrefsX.SetBool("ClickedRepeating", false);
     startRepeatingButton.Colour();
     Debug.Log("cancelling all");
 }
예제 #3
0
 public void NotificationsActive()
 {
     NotificationManager.CancelAll();
     if (PlayerPrefs.GetString("Notifications") == "off")
     {
         return;
     }
     NotificationManager.SendWithAppIcon(TimeSpan.FromDays(1), "", "", mainColors.colorBackGround, NotificationIcon.Message);
     NotificationManager.SendWithAppIcon(TimeSpan.FromDays(2), "", "", mainColors.colorTouches, NotificationIcon.Heart);
     NotificationManager.SendWithAppIcon(TimeSpan.FromDays(3), "", "", mainColors.colorGraphs, NotificationIcon.Clock);
     NotificationManager.SendWithAppIcon(TimeSpan.FromDays(7), "", "", mainColors.colorLines, NotificationIcon.Bell);
     NotificationManager.SendWithAppIcon(TimeSpan.FromDays(30), "", "", mainColors.colorError, NotificationIcon.Star);
     return;
 }
예제 #4
0
        IEnumerator winState()
        {
            gameOver = true;
            waveBox_UI.GetComponent <Image>().color = new Color(0.0F, 0.0F, 1F, 0.5F);
            waveBox_UI.gameObject.SetActive(true);
            waveText_UI.text = "Tu bebe se ha dormido!";
            yield return(new WaitForSeconds(1));

            returnButton_UI.gameObject.SetActive(true);
            //Si gana, enviar 3 cada 3 horas y quitar la anteriores
            NotificationManager.CancelAll();
            for (int i = 1; i <= 3; i++)
            {
                NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds(i * 10800), "Baby Oops!", "Tu bebe necesita de atención", new Color(0, 0.6f, 1), NotificationIcon.Clock);
            }
            PlayerPrefs.SetInt("hasPlayed", 1);
        }
예제 #5
0
        public void OnGUI()
        {
            if (GUILayout.Button("Simple 5 sec", GUILayout.Height(Screen.height * 0.2f), GUILayout.Width(Screen.width)))
            {
                NotificationManager.Send(TimeSpan.FromSeconds(5), "Simple notification", "Customize icon and color", new Color(1, 0.3f, 0.15f));
            }

            if (GUILayout.Button("Normal 5 sec", GUILayout.Height(Screen.height * 0.2f), GUILayout.Width(Screen.width)))
            {
                NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds(5), "Notification", "Notification with app icon", new Color(0, 0.6f, 1), NotificationIcon.Message);
            }

            if (GUILayout.Button("Custom 5 sec", GUILayout.Height(Screen.height * 0.2f), GUILayout.Width(Screen.width)))
            {
                var notificationParams = new NotificationParams
                {
                    Id             = UnityEngine.Random.Range(0, int.MaxValue),
                    Delay          = TimeSpan.FromSeconds(5),
                    Title          = "Custom notification",
                    Message        = "Message",
                    Ticker         = "Ticker",
                    Sound          = true,
                    Vibrate        = true,
                    Light          = true,
                    SmallIcon      = NotificationIcon.Heart,
                    SmallIconColor = new Color(0, 0.5f, 0),
                    LargeIcon      = "app_icon"
                };

                NotificationManager.SendCustom(notificationParams);
            }

            if (GUILayout.Button("Cancel all", GUILayout.Height(Screen.height * 0.2f), GUILayout.Width(Screen.width)))
            {
                NotificationManager.CancelAll();
            }
        }
 public void CancelAll()
 {
     NotificationManager.CancelAll();
 }