Cannot get push notifications in Android using trigger.io and parse.com.


I just started developing an Android and iPhone app with trigger.io and parse.com . Now I am stuck trying to add push notifications to the application. I send test clicks from the control panel to parse.com , but nothing happens on the Android phone I'm testing with.

Here is what I did:

  • Added partners / parsing section in config.json with applicationId and clientKey from parse.com settings

  • Added the "event": true section to the modules section in config.json

  • My config.json looks like this:

     { "config_version": "2", "name": "My test app", "author": "(my email)", "version": "0.1", "platform_version": "v1.4", "description": "An empty app created by default", "modules": { "logging": { "level": "DEBUG" }, "event": true, "geolocation": true, "contact": true, "file": true, "is": true, "media": true, "notification": true, "prefs": true, "request": { "permissions": ["http://*/*", "https://*/*"] }, "tools": true, "reload": true }, "partners": { "parse": { "applicationId": "(my real app id)", "clientKey": "(my real client key)" } } } 
  • The following code has been added to listen for incoming clicks:

     forge.logging.info('Adding push listener'); forge.event.messagePushed.addListener(function (msg) { forge.logging.info('Got push: '); forge.logging.info(JSON.stringify(msg)); }, function(err) { forge.logging.error('There was an error receiving push!'); forge.logging.error(err); }); 
  • To test the application, I connect my Android phone via USB cable to my Mac and select "Run android" in the Trigger toolbox in the browser

  • In the journal I see the messages "Initialization of analysis and subscription to the default channel" and "Adding a traveler"

  • I go to parse.com Push notifications and see that there is one device connected. I am testing to send multiple messages, some in Message mode, some in JSON mode.

  • Parse thinks messages are being sent, but nothing is being written on my side

  • I also tested connecting another Android phone. Parse then indicated that there are two phones available, but the new phone also did not receive any messages.

Looking at the documentation and examples, I can't think of anything else to try. I cannot decide if this is a trigger.io problem or a parse.com problem.

Does anyone have any ideas?

+2
source share
1 answer

Is this a problem when you use the default broadcast rather than a named pipe?

We have a fix for the problem with the broadcast channel on Android, ready for deployment tomorrow or early next week - this will be in the platform version v1.4.27.

+3
source

All Articles