Exemple #1
0
        public void scheduleAction()
        {
            updateValues();

            NotificationBuilder builder = new NotificationBuilder(id, title, body);

            builder
            .setTicker(ticker)
            .setDefaults(flags)
            .setAlertOnlyOnce(alertOnce.isOn)
            .setDelay(delay * 1000)
            .setRepeating(repeating.isOn)
            .setAutoCancel(autoCancel.isOn)
            .setGroup(group)
            .setColor(color)
            .setSound("ses")
            .setInterval(interval * 1000);


            if (repeating.isOn && interval == 0)
            {
                AndroidNotifications.showToast("Enter interval");
            }
            else
            {
                AndroidNotifications.scheduleNotification(builder.build());

                AndroidNotifications.showToast("Notification scheduled");
            }
        }
Exemple #2
0
        /// <summary>
        /// Cancels notification with current id
        /// </summary>
        public void cancelAction()
        {
            updateValues();

            AndroidNotifications.cancelNotification(id);

            AndroidNotifications.showToast("Notification cancelled (" + id + ")");
        }
Exemple #3
0
 /// <summary>
 /// Clear all notifications buttin action
 /// </summary>
 public void clearAll()
 {
     AndroidNotifications.clearAll();
     AndroidNotifications.showToast("All cleared");
 }
Exemple #4
0
 /// <summary>
 /// Clear current notification button id
 /// </summary>
 public void clearCurrent()
 {
     AndroidNotifications.clear(id);
     AndroidNotifications.showToast("Cleared id " + id);
 }