[aerogear-dev] shiny objects

Matthias Wessendorf matzew at apache.org
Mon Aug 5 03:44:28 EDT 2013


Pretty cool bits and a great research project.

Once the 0.8.0 is out, in a few weeks, I do not mind adding this for a
0.9.0 or 1.0.0 release.

Greetings,
Matthias


On Sun, Aug 4, 2013 at 1:23 AM, Lucas Holmquist <lholmqui at redhat.com> wrote:

> So most of you all know my love of shiny objects.  With the release of
> 0.0.2 of the Admin UI,  i decided to make yesterday( friday. 8/2 ) a day
> about experimenting.
>
> A while ago i started to play with Chrome Packaged Apps and sending Push
> messages to them with GCM for Chrome[1] and how we could integrate that
> service into the Unified Push Server.   My first attempt back then failed,
> so i decided to have another go at it.  I'm happy to report that i got it
> working this time.
>
> I created a chrome branch[2] in my fork of the Push server and also a
> chrome branch[3] in my fork of the admin UI.
>
> Just a quick rundown of how this messaging works:
>
> 1. you create an app in the google api console thing - same as android
> 2. Then you need to generate a refresh and access token - this is
> different than android
> ** the refresh token doesn't expire unless explicitly revoked, but the
> access token does every 60 minutes(?)
> 3. Send the message with the client id, client secret( these 2 are
> generated from step 1 ) and the access token
>
> it is not recommend to get a new access token for every request since
> there is a limit.
>
> Integrating this into the push server wasn't to bad,  just tedious because
> of all the interfaces and such.
>
> probably the crappiest code is the actual sender that i wrote( actually
> taken from the simple push sender  ).   It gets a new access token every
> time which as i stated before is bad.
>
> I'm not sure if we should store the access token with the timer or
> what. The model that i created for this has a clientId, clientSecret, and a
> refreshToken
>
>
> here is the sample code that i threw together for receiving the
> notifications[4].  i didn't make any comments or anything it them,  just
> some things hacked together
>
>
>
> I think GCM for chrome is somewhat new.  It would be cool to add this for
> a 1.1 release or something.  i'm not really sure how much it is used,   but
> the more networks we can unify the better.
>
>
> -Luke
>
>
>
>
>
>
>
>
>
> 1. http://developer.chrome.com/apps/cloudMessaging.html
> 2. https://github.com/lholmquist/aerogear-unified-push-server/tree/chrome
> 3.
> https://github.com/lholmquist/aerogear-unified-push-server-admin-ui/tree/chrome
> 4.
> https://github.com/lholmquist/chrome-app-codelab/tree/chromepush/lab2_basic
>
> _______________________________________________
> 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/20130805/7b591a6f/attachment.html 


More information about the aerogear-dev mailing list