Closed knusperpixel closed 10 years ago
I'm sorry, my bad. Forgot to JSON.stringify
the json payload :-(
;)
Hi, I'm afraid I have a similar problem, and it's not due to a stringify.
This is how I add the notifications ( which sounds in the system ): window.plugin.notification.local.add({ date: new Date( alarm_time ), message: dateFormat( start,"HH.MM" )+": "+summary, badge: 1 });
And this is the onadd:
if ( window.plugin!=undefined && window.plugin.notification!=undefined && window.plugin.notification.local!=undefined ){
alert("foo");
window.plugin.notification.local.onadd = function(id, state, json) {
alert("bar");
};
}
I get the "foo", but not the "bar".
Any clue?
Phonegap 3.3.0 LocalNotification 0.7.2 iOS 7.1
I have added the plugin via PGB
<gap:plugin name="de.appplant.cordova.plugin.local-notification" version="0.7.2" />
I keep the app running in background by setting this preference in
config.xml
:<preference name="exit-on-suspend" value="false" />
I have registered callbacks for add, click and trigger:
where
$('#debug')
is just a div.I add a local notification with this code (after
deviceready
):The notification is displayed (if the app is not in foreground) but none of my callbacks get triggered. Is there something missing or is this a bug?