Skip to content

Instantly share code, notes, and snippets.

@stramargio
Created May 20, 2015 13:12
Show Gist options
  • Save stramargio/894193837b82d7d761ab to your computer and use it in GitHub Desktop.
Save stramargio/894193837b82d7d761ab to your computer and use it in GitHub Desktop.
notifiche multiple scheduled
console.log('setto le notifiche locali');
var now = new Date().getTime(),
_10_secs_from_now = new Date(now + 10*1000);
_20_secs_from_now = new Date(now + 20*1000);
cordova.plugins.notification.local.schedule([{
id: 1,
title: "10 sec notify",
text: "Multi Notification 1",
firstAt: _10_secs_from_now,
every: "hour"
},{
id: 2,
title: "20 sec notify",
text: "Multi Notification 2",
firstAt: _20_secs_from_now,
every: "hour"
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment