4
votes

Currently using build.phonegap.com and parse.com to enable push notifications across two platforms (Android and iOS).

Using the PhoneGap PushPlugin and parse.com REST API I'm able to register an Android device and send the details to parse successfully.

Although I have problems and questions regarding sending the "Pushes".

1.1) When registering an "installation" (https://parse.com/docs/rest#installations-uploading) I'm dynamically creating a random UUID installationId. Is this correct? Or does parse.com have to do this?

1.2) For Android I'm registering pushType for GCM, as I'm not using the Android SDK. Which leads me to question 2.

2) When I setup my Android app settings for push, I'm given a server API Key... parse.com has a keys section, but only for Windows and iOS... does this mean they can't send push using GCM for Android? Even though you can select this when uploading an installation?

The short question. Is it possible to use just the parse.com REST API to register Android devices to send push via GCM (Androids native push service)? Apple devices are working using this method to register them and send notifications.

2
Have you got an answer? I'm on the same situation. - B.R.W.
I've since discovered there is a parse plugin created - but this appears to have a conflict with the popular phonegap pushplugin and causes Android to crash. github.com/avivais/phonegap-parse-plugin - user2575424

2 Answers

0
votes

To answer your short question: Is it possible to use just the parse.com REST API to register Android devices to send push via GCM (Androids native push service)? Yes

I did not have to set installationId and I set pushType to "gcm".

In Parse settings, there is a section "GCM Push Credentials" where you enter "Sender ID" and "API Key". You get both of these from Google. When you create the Parse Installation, you also have to set GCMSenderId to the same thing as "Sender ID".

Note: I'm using the cordova push notification plugin and had to make some changes to PushPlugin.java to get background push notifications to work with the way Parse sends them. That's another topic though.

0
votes

If this helps anyone - I moved over to using PushWoosh with a PhoneGap Build plugin - very simple and integrates in minutes. PushWoosh also has easy integration with Apple to setup and generate certificates (which is great when working on a PC).

https://build.phonegap.com/plugins/1297