I am working with the latest version of this module and have added event listeners like this:
var Parse = require('eu.rebelcorp.parse');
Parse.start();
Parse.subscribeChannel('PushChannel');
Parse.addEventListener('notificationreceive', function(e) {
Ti.API.log("Parse notification receive: ", JSON.stringify(e));
});
Parse.addEventListener('notificationopen', function(e) {
Ti.API.log("Parse notification open: ", JSON.stringify(e));
// check for data
var data = Ti.App.Android.launchIntent.getStringExtra('com.parse.Data');
if(data) {
try {
var json = JSON.parse(data);
// Now handle the click on the notification
} catch(e) {
Ti.API.log("Parse notification open error on parse data: ", JSON.stringify(e));
}
}
});
When a notification is received, the app open as expected but I am not seeing any of the notification events. Here is what LogCat looks like:
03-26 10:42:02.075: D/onReceive(12849): got action com.parse.push.intent.OPEN
03-26 10:42:02.076: D/onReceive(12849): no instance of ParseModule found
03-26 10:30:05.480: W/GCM-DMM(929): broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.penton.android.aw (has extras) }
03-26 10:30:05.510: W/GCM-DMM(929): broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.penton.android.aw (has extras) }
03-26 10:30:05.580: D/onReceive(12849): got action com.parse.push.intent.RECEIVE
03-26 10:30:05.580: D/onReceive(12849): no instance of ParseModule found
03-26 10:30:05.628: D/onReceive(12849): got action com.parse.push.intent.RECEIVE
03-26 10:30:05.628: D/onReceive(12849): no instance of ParseModule found
Obviously there seems to be an issue with "ParseModule", the Public Class for this module - am I missing something in my configuration of the module? I am only including the keys in the tiapp.xml as you specify. Let me know what I am doing wrong.
I am working with the latest version of this module and have added event listeners like this:
When a notification is received, the app open as expected but I am not seeing any of the notification events. Here is what LogCat looks like:
03-26 10:42:02.075: D/onReceive(12849): got action com.parse.push.intent.OPEN 03-26 10:42:02.076: D/onReceive(12849): no instance of ParseModule found
03-26 10:30:05.480: W/GCM-DMM(929): broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.penton.android.aw (has extras) } 03-26 10:30:05.510: W/GCM-DMM(929): broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.penton.android.aw (has extras) } 03-26 10:30:05.580: D/onReceive(12849): got action com.parse.push.intent.RECEIVE 03-26 10:30:05.580: D/onReceive(12849): no instance of ParseModule found 03-26 10:30:05.628: D/onReceive(12849): got action com.parse.push.intent.RECEIVE 03-26 10:30:05.628: D/onReceive(12849): no instance of ParseModule found
Obviously there seems to be an issue with "ParseModule", the Public Class for this module - am I missing something in my configuration of the module? I am only including the keys in the tiapp.xml as you specify. Let me know what I am doing wrong.
Thanks,
Brian Caufield