Created
May 20, 2015 13:12
-
-
Save stramargio/894193837b82d7d761ab to your computer and use it in GitHub Desktop.
notifiche multiple scheduled
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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