[aerogear-dev] message format change proposal
Matthias Wessendorf
matzew at apache.org
Thu Aug 21 07:34:41 EDT 2014
Hi Erik,
overall I am not against changes for 1.1.x, on our master branch. Here is
something that Sebi mentioned a few month ago:
https://issues.jboss.org/browse/AGPUSH-534
With some API change, coming up, let's not forget about "REST API
Versioning", he discussed at our Face2Face meeting:
http://oksoclap.com/p/jbrS1EHWkI
(looks like in that session the majority preferred headers over URI).
We have to support the 1.0.0 APIs for quite a while.
-Matthias
On Thu, Aug 21, 2014 at 1:09 PM, 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
>
--
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/648212a9/attachment.html
More information about the aerogear-dev
mailing list