Ability to use all possible values of a push notification payload

I know you just launched push notifications, which is great, as all my apps use push notifications.

But, I do think we REALLY need the ability to add name value pairs, or some type of flag to the push that is NOT shown to the user. (Apple refers to this as a “Custom Array Property” in the payload.)

I’ve done this with Apple’s APNS service, and it works like this…

First, the payload send via Apples APNS service looks like this:

‘aps’: { ‘title’: ‘Well would ya look at that!’, ‘body’: ‘Hello from the server’, ‘NAME’: ‘VALUE’ },

What I understand from the documentation is that Fuse does not yet support ANY values in the push notification other than the “title” and “body”.

I usually send something like:

‘aps’: { ‘title’: ‘Well would ya look at that!’, ‘body’: ‘Hello from the server’, ‘tab’: ‘news’},

The “tab = news” part of the code is NOT shown to the user, as only the title and body are, but I’m able to get the value of “tab” when the user cicks the notificaiton to open my app, and I can use the value of “tab” to focus the correct part of the app for the user. (The example idea here is a news push comes into the app as a notification, and when the user clicks the push notification, the app opens to the news window of the app, based on the value of the “tab” that was in the push notification payload.) Of course, if the app is open when the push is recieved, then the maybe I also change the app focus to the news window.

The other thing that I think REALLY needs to be included is the badge value, so an app badge icon will show how many alerts have been received. Surprisingly, the app badge number is NOT done on the device, it’s sent with each push, so the math to determine the number to show on the badge is done on the server side, NOT on the app side. Also, the ability to specify a user selectable audio file for the nofication sound should be able to be read from the push notification payload. (Most of my apps have several different types of notifications, and it’s nice if each one can have a different notification sound, or if the user can choose from a list of included sounds for each type of alert.)

I’ve used 3rd party push notificaiton services such as Urban Airship and a few others in the past, and eventually built my own server side APNS service, in part due to the value of being able to fully use the APNS options such as the ones requested here.

So, I’m very happy to see push support added, but respectually ask that we be able to read other values sent in the push payload, such as custom arrays, badge number and notificaiton sounds, in addition to just title and body.

Thanks,

Peter Janett

New Media One Web Services http://www.NewMediaOne.net http://GeoDigs.com support “at” newmediaone.net (303)828-9882

Add us to your address book: http://www.newmediaone.net/New_Media_One.vcf

Would just like to second this request … we use PushSharp for our existing notification server, and it has fields of “alert”, “body”, “loc-key”, “loc-args”, “action-loc-key”,“launch-image”, “badge”, “sound”, “content-available”, “category”.

If those fields are already supported (or any name/value pair is), I would appreciate an example of their consumption – as when I’ve tried to use our existing server to send to the fuse app, badges work, but text content (using the fields above) doesn’t.

Hi guys,

Thanks alot for the feedback. It has been duly noted and added to the roadmap for the Push API. We will revisit this shortly.

Hi Peter, Sean thanks you both for your comments, it’s super helpful. Sorry I took so long to answer this. Luckily I think we have you covered for a lot of this stuff.

Custom Array Property: We already support any json data in the payload. the aps/notification elements in the payload are only used for the system notification (the bit that is visible to the user) the rest is past unchanged to your app

So this is a minimal notification:

{'aps': { 'title': 'Well would ya look at that!', 'body': 'Hello from the server'}}

{"aps":{"alert":"Testing.. (12)","badge":1,"sound":"default"},"any":["other","data"]}

The next thing, (which I really need to add to the documentation) is that ‘title’ & ‘body’ are the only elements of the system notification that we support cross platform.

On iOS you can still uses all their own flags. For example I sent this to my iOS fuse testing app minutes ago

{"aps":{"alert":"Testing.. (0)","badge":1,"sound":"default"}}

And can confirm it works fine.

To the options you mentioned @Sean; all those are available (though ios only of course) but we havent made an effort to make then ‘fusey’ at this point, so you can set the loc-key for example but we dont give you a way to manage localization from fuse yet. That’s defintely on our radar though so thanks for bringing it up!

[UPDATE]

ahah! going through this code again actually uncovered a bug. On ios you NEED to use the alert element to see system notifications. We are fixing this for next week’s release by making android use the same format.