[aerogear-dev] message format change proposal

Matthias Wessendorf matzew at apache.org
Thu Aug 21 07:35:37 EDT 2014


On Thu, Aug 21, 2014 at 1:30 PM, Corinne Krych <corinnekrych at gmail.com>
wrote:

> +1 on a custom-data section.
> Going even further as we add more platforms support, I think having sth
> like cordova push config:
>
> http://aerogear.org/docs/guides/aerogear-cordova/AerogearCordovaPush/#_sample_example
> where you have platform specific section would be nice.
>

perhaps, not fully convinced atm. Original idea was to have a simple format
for multiple platforms.


>
> ++
> Corinne
>
> On 21 Aug 2014, at 13:09, Erik Jan de Wit <edewit at redhat.com> wrote:
>
> > Hi,
> >
> > With the upcoming windows support and simple push change (making simple
> push more like 'normal') the number of ‘special’ keys in our message is
> increasing. Right now we are mixing our ‘special’ keys with those the user
> can add, but we keep simple push out of it:
> >
> > {
> >
> >
> > "variants" : ["c3f0a94f-48de-4b77-a08e-68114460857e",
> "444939cd-ae63-4ce1-96a4-de74b77e3737" ....],
> >
> >
> > "alias" : ["user at account.com", "someone at aerogear.org", ....],
> >
> >
> > "categories" : ["someCategory", "otherCategory"],
> >
> >
> > "deviceType" : ["iPad", "AndroidTablet"],
> >
> >
> > "ttl" : 3600,
> >
> >
> > "message": {
> >
> >
> > "alert":"HELLO!",
> >
> >
> > "sound":"default",
> >
> >
> > "badge":7,
> >
> >
> > "content-available" : true,
> >
> >
> > "action-category" : "some_category",
> >
> >
> >
> > "someKey":"some value",
> >
> >
> > "anotherCustomKey":"some other value"
> >
> >
> > },
> > "simple-push": "version=123”
> > }
> >
> >
> > As simple push is going to be more like ‘normal’ push why not move the
> simple-push into the message as well. As for the windows support there are
> a lot more types of messages you can send. The most normal form is called
> ‘toast’, but there are other ones for when you app is pinned to the home
> screen. Then one can send message that contain pictures. To support all of
> this we need something like this:
> https://gist.github.com/edewit/305d76c31960aa6254a9
> >
> > Adding all these ‘special’ keys will make it easier to get into a
> conflict with the users own data, so I propose we put the user data into a
> separate data object, like so:
> >
> > {
> >
> >
> > "variants" : ["c3f0a94f-48de-4b77-a08e-68114460857e",
> "444939cd-ae63-4ce1-96a4-de74b77e3737" ....],
> >
> >
> > "alias" : ["user at account.com", "someone at aerogear.org", ....],
> >
> >
> > "categories" : ["someCategory", "otherCategory"],
> >
> >
> > "deviceType" : ["iPad", "AndroidTablet"],
> >
> >
> > "ttl" : 3600,
> >
> >
> > "message": {
> >
> >
> > "alert":"HELLO!",
> >
> >
> > "sound":"default",
> >
> >
> > "badge":7,
> >
> >
> > "content-available" : true,
> >
> >
> > "action-category" : "some_category",
> >          "simple-push": "version=123",
> >
> >
> > "data" : {
> >
> >
> > "someKey":"some value",
> >
> >
> > "anotherCustomKey":"some other value"
> >
> >
> > }
> >
> >
> > }
> > }
> >
> >
> > WDYT?
> >
> > Cheers,
> >       Erik Jan
> > _______________________________________________
> > aerogear-dev mailing list
> > aerogear-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20140821/cd88bd04/attachment-0001.html 


More information about the aerogear-dev mailing list