From fdc44445ebd15f4ef5833591e4c45e7df58644f2 Mon Sep 17 00:00:00 2001 From: Koichi Yamamoto Date: Wed, 5 Jul 2017 15:24:39 +0900 Subject: [PATCH] Fixed SendNotification with TimeSpan. --- UnityProject/Assets/LocalNotification.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UnityProject/Assets/LocalNotification.cs b/UnityProject/Assets/LocalNotification.cs index 7f70d2e..4d855af 100644 --- a/UnityProject/Assets/LocalNotification.cs +++ b/UnityProject/Assets/LocalNotification.cs @@ -13,12 +13,12 @@ public class LocalNotification public static int SendNotification(TimeSpan delay, string title, string message, Color32 bgColor, bool sound = true, bool vibrate = true, bool lights = true, string bigIcon = "") { int id = new System.Random().Next(); - return SendNotification(id, (int)delay.TotalSeconds, title, message, bgColor, sound, vibrate, lights, bigIcon); + return SendNotification(id, (int)delay.TotalSeconds*1000, title, message, bgColor, sound, vibrate, lights, bigIcon); } public static int SendNotification(int id, TimeSpan delay, string title, string message, Color32 bgColor, bool sound = true, bool vibrate = true, bool lights = true, string bigIcon = "") { - return SendNotification(id, (int)delay.TotalSeconds, title, message, bgColor, sound, vibrate, lights, bigIcon); + return SendNotification(id, (int)delay.TotalSeconds*1000, title, message, bgColor, sound, vibrate, lights, bigIcon); } public static int SendNotification(int id, long delayMs, string title, string message, Color32 bgColor, bool sound = true, bool vibrate = true, bool lights = true, string bigIcon = "")