Hi all,
I am working on Monaca project and I found that Kii has one plugin for Monaca support Push Notification (Find detail of this plugin at here). I followed way of implementation of given example (example here) from that plugin, I can register the Kii Notification with my settings (Sender_id, kii_app_id, etc). But when I create a Direct Notification to logged Kii user for Android device, an exception is thrown that is: pushReceived is not defined.
The pushReceived is callback method which is defined when we register Push Notification by below code:
window.kiiPush.register(kii, {
received: "pushReceived",
success: function (token) {
alert('token=' + token);
},
failure: function (msg) {
alert('error ' + msg);
}
});
And:
window.kiiPush.initAndroid("SENDER_ID", "pushReceived", {
user: {
ledColor: "#FFFF00FF",
notificatonText: "user"
},
direct: {
showInNotificationArea: true,
ledColor: "#FFFFFFFF",
notificatonTitle: "$.title",
notificatonText: "$.msg"
},
success: function () {
console.log('init done');
},
failure: function (msg) {
console.log('error ' + msg);
}
});
The pushReceived callback is defined like below:
function pushReceived(args) {
alert('push received:'+JSON.stringify(args));
}
Do you know the root cause