Get Parse.com Push working?

Hi all,

I’ve just finished going through the Parse experience using Corona and found out how it just doesn’t work on Android, and the notifications just come in blank.

I’ve been in touch with Parse support and (they say) they confirmed that the issue is with Corona.

https://developers.facebook.com/bugs/1456150421348412/

Now, the reason I chose to try out Parse over OneSignal, even though it would be harder to implement, is that Parse’s features of analytics and targeting are so much more advanced, like defining geographical areas or a radius around a location to deliver notifications. The latter being just great for a business app such as mine.

I’d love to hear from Corona if there’s any kind of work being done to fully support Parse Push notifications in the near future. Or the far future. Or “soon”.

And I bet these guys would too:

https://forums.coronalabs.com/topic/53637-parse-push-notifications-working-with-corona-sdk/

https://forums.coronalabs.com/topic/56073-parse-push-registration-w-android/

Thanks,

Sam.

We support iOS and Google GCM today. For the longest time, Parse didn’t do GCM, they did their own thing on Android which we didn’t support. If Parse.com is using GCM in a standard way (I don’t see how REST fits in  here).  I would like to know more about this bug they say is ours, and we may at some point need a bug report filed.

Rob

Hi Rob.

How can I help?

The bug description is as I filed on Parse there. The content of the notification doesn’t show on the open tray. Also the title doesn’t apply, leaving the standard app name to show (realized this today as I didn’t really understand how the title worked before).

I didn’t know about this GCM situation, but apparently now they are using it as well as their own thing from before. I had to input my GCM project number and API key on their panel, and each device installation has a ‘pushType’ field you can set to ‘gcm’.

Hey Zalacans. I help work on OneSignal and this is a great feedback item for us.

Being able to target notifications based on specific geographical area is definitely a feature we will be supporting in the near future. For now, it’s possible to accomplish similar targeting using tags, but we know this is not ideal for your use case. 

Please feel free to reach out if we’re missing any other features you need. Our aim is to soon surpass all other push notification providers both in features and quality.

I read the bug report you filed there, and they say they’ve ID’ed the bug, but there isn’t much in their post that points to this issue. Given that many other services can send push messages to our GCM based push notifications.  When you work with 3rd parties, it’s hard to nail down where the responsibility really is. If Parse.com has a good test case in addition to yours then our Engineers can look at it. 

Maybe they can add to this post what they’ve found.

Rob

*** This is quite an urgent matter as my client’s app is due for release next Monday. ***

ok I am getting this same issue from Parse, they say it points to Corona, they are using google GCM, so I’m still not sure who’s at fault but it only seems to be corona users having this problem, my friend uses Parse for android and it works perfectly on a native written app but I have some more info if it helps. Also parse has opened their libs to open source so maybe that would help also https://github.com/ParsePlatform/parse-sdk-android

When the App is open or is opened by pressing the push notification the data that comes in is as follows:

type = “remote”

name = “notification”

androidGcmBundle = table

alert = “” <-----------------------------------THIS IS THE PROBLEM (Alert is Blank hence no message shown)

applicationState = active

 

In the androidGcmBundle table there is the following:

collapse_key = “do_not_collapse”

time = “2015-09-09T09:39"23.558Z”

from = application # from google

data = “{“alert”:“Hello everybody”,push_hash”:“7cd7fea7c356 etc.”, “title”:“Hello everybody”}"   --note this is a string

push_id = push ID

 

Obviously I can extract the data from the androidGcmBundle when I’m inside the app by json.decode on the string.

 

The problem with this is that the push notification shows up on the device and the alert is blank except for the title of the App, the user has no idea what the push notification is for because alert is blank.

Anybody? Cricket cricket

Here is what Engineering had to say:

First, I would recommend they test GCM push notifications via sample app “System/GooglePushNotifications” that is included with the Corona Simulator.  That app will push a notification to itself via GCM.  He just needs to set the Google project number in the “config.lua” and the “googleApiKey” in the “main.lua”… oh and make sure to use the same package name that his real app uses too.  Also see function onTap() within the “main.lua” because it documents how  to set up the JSON for a notification’s alert message, custom sound file, and custom data.  If the alert message works with this sample app with his GCM configuration, then this indicates that he is having an issue on the Parse side, which I suspect is true since the posted results show an empty alert string within his JSON.

Second, the “androidGcmBundle” field that he posted is *exactly* how Google delivers GCM messages to Android on the Java side.  So, yes, that’s everything the app is receiving.  Also note that Google does not deliver the entire JSON as is to the app.  The root level of the JSON table gets turned into an Android “Bundle” object (which is really a hash table) and all child JSON tables are converted by Google into flat strings.  As in, Corona is not doing this, Google is.  That’s out of our control.

Rob

We support iOS and Google GCM today. For the longest time, Parse didn’t do GCM, they did their own thing on Android which we didn’t support. If Parse.com is using GCM in a standard way (I don’t see how REST fits in  here).  I would like to know more about this bug they say is ours, and we may at some point need a bug report filed.

Rob

Hi Rob.

How can I help?

The bug description is as I filed on Parse there. The content of the notification doesn’t show on the open tray. Also the title doesn’t apply, leaving the standard app name to show (realized this today as I didn’t really understand how the title worked before).

I didn’t know about this GCM situation, but apparently now they are using it as well as their own thing from before. I had to input my GCM project number and API key on their panel, and each device installation has a ‘pushType’ field you can set to ‘gcm’.

Hey Zalacans. I help work on OneSignal and this is a great feedback item for us.

Being able to target notifications based on specific geographical area is definitely a feature we will be supporting in the near future. For now, it’s possible to accomplish similar targeting using tags, but we know this is not ideal for your use case. 

Please feel free to reach out if we’re missing any other features you need. Our aim is to soon surpass all other push notification providers both in features and quality.

I read the bug report you filed there, and they say they’ve ID’ed the bug, but there isn’t much in their post that points to this issue. Given that many other services can send push messages to our GCM based push notifications.  When you work with 3rd parties, it’s hard to nail down where the responsibility really is. If Parse.com has a good test case in addition to yours then our Engineers can look at it. 

Maybe they can add to this post what they’ve found.

Rob

*** This is quite an urgent matter as my client’s app is due for release next Monday. ***

ok I am getting this same issue from Parse, they say it points to Corona, they are using google GCM, so I’m still not sure who’s at fault but it only seems to be corona users having this problem, my friend uses Parse for android and it works perfectly on a native written app but I have some more info if it helps. Also parse has opened their libs to open source so maybe that would help also https://github.com/ParsePlatform/parse-sdk-android

When the App is open or is opened by pressing the push notification the data that comes in is as follows:

type = “remote”

name = “notification”

androidGcmBundle = table

alert = “” <-----------------------------------THIS IS THE PROBLEM (Alert is Blank hence no message shown)

applicationState = active

 

In the androidGcmBundle table there is the following:

collapse_key = “do_not_collapse”

time = “2015-09-09T09:39"23.558Z”

from = application # from google

data = “{“alert”:“Hello everybody”,push_hash”:“7cd7fea7c356 etc.”, “title”:“Hello everybody”}"   --note this is a string

push_id = push ID

 

Obviously I can extract the data from the androidGcmBundle when I’m inside the app by json.decode on the string.

 

The problem with this is that the push notification shows up on the device and the alert is blank except for the title of the App, the user has no idea what the push notification is for because alert is blank.

Anybody? Cricket cricket

Here is what Engineering had to say:

First, I would recommend they test GCM push notifications via sample app “System/GooglePushNotifications” that is included with the Corona Simulator.  That app will push a notification to itself via GCM.  He just needs to set the Google project number in the “config.lua” and the “googleApiKey” in the “main.lua”… oh and make sure to use the same package name that his real app uses too.  Also see function onTap() within the “main.lua” because it documents how  to set up the JSON for a notification’s alert message, custom sound file, and custom data.  If the alert message works with this sample app with his GCM configuration, then this indicates that he is having an issue on the Parse side, which I suspect is true since the posted results show an empty alert string within his JSON.

Second, the “androidGcmBundle” field that he posted is *exactly* how Google delivers GCM messages to Android on the Java side.  So, yes, that’s everything the app is receiving.  Also note that Google does not deliver the entire JSON as is to the app.  The root level of the JSON table gets turned into an Android “Bundle” object (which is really a hash table) and all child JSON tables are converted by Google into flat strings.  As in, Corona is not doing this, Google is.  That’s out of our control.

Rob