<div dir="ltr"><div style><br></div><div style><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 26, 2013 at 5:42 PM, Summers Pittman <span dir="ltr">&lt;<a href="mailto:supittma@redhat.com" target="_blank">supittma@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  

    
  
  <div text="#000000" bgcolor="#FFFFFF">
    So after talking with matzew for a bit, I&#39;ve put together this list
    of things that need to be done on Android to have a good push
    experience (for the user).  My goal is that we discuss these things
    to inform a (eventual) push client spec.<br>
    <br>
    1)  Gobs of XML Boilerplate.<br>
       the Android manifest needs permissions and uses permissions
    stanzas as well as defining the Google Cloud Message receiver.  *We
    should probably have tooling which does this for the user*<br>
      see:
    
    <a href="https://github.com/secondsun/devnexus2013demo/blob/master/coffeeExample/AndroidManifest.xml" target="_blank">https://github.com/secondsun/devnexus2013demo/blob/master/coffeeExample/AndroidManifest.xml</a></div>
</blockquote><div><br></div><div style>yup - </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"><br>
    <br>
    2) A Intent handling Service.<br>
      This Service class extends *GCMBaseIntentService*<span></span> has three
    responsibilities, *Registering* clients, *Unregistering* clients,
    and *Handling* messages.  <br>
       see:
    
    <a href="https://github.com/secondsun/devnexus2013demo/blob/master/coffeeExample/src/net/saga/android/coffeeexample/GCMIntentService.java" target="_blank">https://github.com/secondsun/devnexus2013demo/blob/master/coffeeExample/src/net/saga/android/coffeeexample/GCMIntentService.java</a><br>

    <br>
      I would prefer developers not have to extend this class, but that
    is a talk for a different day.<br></div></blockquote><div><br></div><div style>yup</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
    <br>
    3) Some utlities for handling/parsing/routing notifications to other
    bits of code.  Again, this is a talk for a different day.<br>
    <br>
    Appendix:<br>
      Here is a link to a class based HEAVILY on Google&#39;s Service
    Utilities class from their demo apps<br>
     
    
    <a href="https://github.com/secondsun/devnexus2013demo/blob/master/coffeeExample/src/net/saga/android/coffeeexample/ServerUtilities.java" target="_blank">https://github.com/secondsun/devnexus2013demo/blob/master/coffeeExample/src/net/saga/android/coffeeexample/ServerUtilities.java</a></div>
</blockquote><div><br></div><div style>yes, a util that not only stores the regId (aka token), also the other required data (as discussed on earlier threads)</div><div style><br></div><div style><br></div><div style>Not to forget the MainActivity.onCreate() hook:<div>
<a href="https://github.com/secondsun/devnexus2013demo/blob/master/coffeeExample/src/net/saga/android/coffeeexample/MainActivity.java#L23-L25">https://github.com/secondsun/devnexus2013demo/blob/master/coffeeExample/src/net/saga/android/coffeeexample/MainActivity.java#L23-L25</a><br>
</div><div><br></div><div>For Apple (not sure for google), a token (received via the Intent) _might_ change, so we should update would be something good (instead of just doing POST)<br></div><div><br></div></div><div style>
-Matthias</div><div style><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
<br>
    <br>
    <br>
  </div>

<br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br>
<br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div></div>