Created
May 20, 2015 12:55
-
-
Save stramargio/36569f6bdf6f9367840c to your computer and use it in GitHub Desktop.
ciclo
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
setStandsLocalNotifications: function() { | |
cordova.plugins.notification.local.clearAll(function() { | |
console.log('clear delle notifiche impostate precedentemente'); | |
}, this); | |
console.log('setto le notifiche locali'); | |
for (var i = 0; i < config.stands.notifications.length; i++) { | |
var _notification = config.stands.notifications[i]; | |
console.log('Testo per la notifica', _notification.pushID); | |
console.log(_notification.pushText); | |
var now = new Date().getTime(), | |
_secs_from_now = new Date(now + i*5*1000); | |
cordova.plugins.notification.local.schedule({ | |
id: _notification.pushID, | |
title: '"' + _notification.pushTitle + '"', | |
text: '"' + _notification.pushText + '"', | |
firstAt: _secs_from_now, | |
every: '"' + _notification.pushEvery + '"' | |
}); | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment