I'm trying to build an alarm clock app, and am using the localNotification and trying to adapt the code from http://www.drewdahlman.com/meusLabs/?p=84.
My app is a combination of phonegap with backbone. I'm setting the localNotification with
plugins.localNotification.add({ date: set_alarm, message: 'Wakey Wakey...', badge: 0, id: 12, sound:'Alarm.cab', background:'MyApp.Views.Alarm.notification()', foreground:'MyApp.Views.Alarm.notification()' });
later, in my MyApp.Views.Alarm i have
notification: function(){ alert('alarm'); }
unfortunately, this alert is never triggered in iOS simulator.
xCode outputs the following
2012-07-25 10:06:25.054 Wakey[8253:13403] Notification Set: 2012-07-25 10:07:25 +0000 (ID: 12, Badge: 0, sound: Alarm_01.cab, background: Wakey.Views.Alarm.notification(), foreground: Wakey.Views.Alarm.notification()) 2012-07-25 10:06:25.055 Wakey[8253:13403] [INFO] 2012-07-25T10:07:25.044Z 2012-07-25 10:06:25.056 Wakey[8253:13403] [INFO] "2012-07-25T10:07:25.044Z" 2012-07-25 10:06:25.058 Wakey[8253:13403] I was currently active
The strange part is, I can't find anywhere the in my code where I'm outputing 'I was currently active'. Which I find strange, and it isn't in the localNotification plugin files.
Any suggestions as to why my notifications aren't being triggered?