nativescript-local-notifications icon indicating copy to clipboard operation
nativescript-local-notifications copied to clipboard

interval is not working not for second , minute or hour

Open Mia12344 opened this issue 6 years ago • 5 comments
trafficstars

hey i am using local-notifications in android and i have seen some updates about the use of interval with local notifications i have tested it but its not working for me how can i test it with your repo ?

i am using local notification like this way


  public doScheduleEveryMinute(): void {
    LocalNotifications.schedule(
        [{
          id: 6,
          title: 'Every minute!',
          interval: 'minute', // some constant
          body: 'I\'m repeating until cancelled',
          icon: 'res://ic_stat_smiley',
          thumbnail: "res://ic_stat_notify",
          forceShowWhenInForeground: true,
          at: new Date(new Date().getTime() + 10 * 1000)
        }])
        .then(() => {
          alert({
            title: "Notification scheduled",
            message: 'ID: 6, repeating',
            okButtonText: "OK, thanks"
          });
        })
        .catch(error => console.log("doScheduleEveryMinute error: " + error));
  }

their is no exception but its not working will you please help

Mia12344 avatar Nov 20 '18 07:11 Mia12344

Which platform? iOS, Android, both?

And when you say it’s not working: do you see notifications which don’t honor the interval, or are there no notifications at all?

EddyVerbruggen avatar Nov 20 '18 08:11 EddyVerbruggen

i am using Android Notifications are working for the first time and if i set the interval of minute to the notifications then after showing first time notification it will not repeat itself after one minute.

Mia12344 avatar Nov 20 '18 08:11 Mia12344

any update sir

Mia12344 avatar Nov 22 '18 18:11 Mia12344

I have not been able to reproduce it.

EddyVerbruggen avatar Nov 22 '18 19:11 EddyVerbruggen

Try adding the property "at", it didn't work for me, I added it and it works correctly.

Gcuencam avatar Nov 28 '18 14:11 Gcuencam