Esempio n. 1
0
        public async Task Cancel(int id)
        {
            await this.repository.Remove <Notification>(id.ToString());

            var native = NativeManager.Load(id.ToString());

            if (native != null)
            {
                NativeManager.Delete(native);
            }
        }
Esempio n. 2
0
        public async Task Send(Notification notification)
        {
            if (notification.Id == 0)
            {
                notification.Id = this.settings.IncrementValue("NotificationId");
            }

            var native = this.Create(notification);

            //AlarmManager.CreateAlarm(notification.ScheduleDate.Value.ToLocalTime(), AlarmWeekFlag.AllDays, native);

            NativeManager.Post(native);
            await this.repository.Set(notification.Id.ToString(), notification);
        }
Esempio n. 3
0
        public async Task Clear()
        {
            await this.repository.Clear <Notification>();

            NativeManager.DeleteAll();
        }