/* * * Función encargada de notificar al usuario en caso de existir algún mensaje nuevo * en un hilo al cuál se haya suscrito previamente * */ public void Notificar(string tema, string hilo) { NativeToolkit.ClearAllLocalNotifications(); NativeToolkit.ScheduleLocalNotification("Nuevos comentarios en el tema " + tema, "Alguien ha comentado en el siguiente hilo al cuál está suscrito " + hilo); }
public void OnLocalNotificationPress() { string message = "This is a local notification! This is a super long one to show how long we can make a notification. " + "On Android this will appear as an extended notification."; NativeToolkit.ScheduleLocalNotification("Hello there", message, 1, 0, "sound_notification", true, "ic_notification", "ic_notification_large"); }
public void SetupLocalNotifications(int delayInMin, int days) { for (int i = 0; i < days; i++) { NativeToolkit.ScheduleLocalNotification("GET FIT", "Wie wär's mit einem Workout?", 0, delayInMin + (1440 * i), "default_sound", true, "ic_notification", "ic_notification_large"); } }
void Update() { if (isUpdate) { isUpdate = false; Debug.Log("UpdateSchedule"); calendarPanel.UpdateSchedules(schedules); schedules.Clear(); NativeToolkit.ScheduleLocalNotification(noticeStr, noticeContent, 1, noticeMin, "sound_notification", true, "ic_notification", "ic_notification_large"); } }
public static void SetupLocalNotificationsOnReboot(int h, int m, int days) { NativeToolkit.ClearAllLocalNotifications(); DateTime dt = DateTime.Now.Date.AddDays(1); TimeSpan ts = new TimeSpan(h, m, 0); dt = dt.Date + ts; TimeSpan delay = dt - DateTime.Now; int delayInMin = (int)delay.TotalMinutes; for (int i = 0; i < days; i++) { NativeToolkit.ScheduleLocalNotification("GET FIT", "Hi, wie wär's mit einem Workout?", 0, delayInMin + (1440 * i), "default_sound", true, "ic_notification", "ic_notification_large"); } }
public static void ScheduleNotifcation(string title, string message, int id, int delay) { // Schedule a notificaiton NativeToolkit.ScheduleLocalNotification(title, message, id, delay, "default_sound", true, "ic_notification", "ic_notification_large"); }
private void NativeToolkit_OnImageSaved(string obj) { NativeToolkit.ScheduleLocalNotification("DentalAR", "Image saved to " + obj, smallIcon: "", largeIcon: "dental_notification_large"); }