herve76
September 10, 2014, 8:34pm
1
I am using the local notification plugin https://github.com/katzer/cordova-plugin-local-notifications.git
window.plugin.notification.local.onclick works fine if I stay on the same page, but if I move to another page, window.plugin.notification.local.onclick is not being called.
Any idea what am I doing wrong?
Hervé
sajith
October 21, 2014, 1:42pm
2
document.addEventListener(‘deviceready’, function () {
// window.plugin.notification.local is now available
window.plugin.notification.local.onclick = function (id, state, json) {
if(id === ‘Odean’)
{
window.location.href = ‘#/tab/offers-bpage/0’;
}
else if(id === ‘Black Horse Pub’)
{
window.location.href = ‘#/tab/offers-bpage/1’;
}
else if(id === ‘M&S’){
window.location.href = ‘#/tab/offers-bpage/2’;
}
}
}, false);
Unfortunately not, its not that easy.