<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 13, 2013 at 9:19 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 bgcolor="#FFFFFF" text="#000000"><div class="im">
    <div>On 06/13/2013 03:11 PM, Matthias
      Wessendorf wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hello,
        <div><br>
        </div>
        <div>awesome!<br>
          <div class="gmail_extra"><br>
            <br>
            <div class="gmail_quote">On Thu, Jun 13, 2013 at 8:37 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">Good
                News everyone!  We have code which registers Android
                devices to<br>
                receive messages from pushee.<br>
                It is still very VERY limited, but code which will
                display a<br>
                notification when the app receives a message looks like
                this:<br>
                <br>
                <a href="https://gist.github.com/secondsun/242063868b09db030331" target="_blank">https://gist.github.com/secondsun/242063868b09db030331</a></blockquote>
              <div><br>
              </div>
              <div>the Callback (on r.register()), is success
                invoked, when PushEE returns HTTP Status 20x (for
                successful REGISTRATION of the device (aka
                &quot;MobileVariantInstance&quot;), right?</div>
            </div>
          </div>
        </div>
      </div>
    </blockquote></div>
    Correct<div class="im"><br>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div class="gmail_extra">
            <div class="gmail_quote">
              <div>Similar, the &#39;failure&#39; is invoked when
                PushEE returns any error code (e.g. no connection, or
                404 or what ever), right ?</div>
            </div>
          </div>
        </div>
      </div>
    </blockquote></div>
    Correct<div class="im"><br></div></div></blockquote><div><br></div><div><br></div><div style>good</div><div><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 bgcolor="#FFFFFF" text="#000000"><div class="im">
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div class="gmail_extra">
            <div class="gmail_quote">
              <div><br>
              </div>
              <div><br>
              </div>
              <div>BTW. is the PushConfig &quot;magically&quot; receiving
                the regId, from the Intent&#39;s onRegistered()? <br>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote></div>
    Ha ha on Registered, that is so 3 weeks ago.  Google trashed that
    API and provided us with a new shiny one!<br></div></blockquote><div><br></div><div style>:-P</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 bgcolor="#FFFFFF" text="#000000">
    <br>
    The reg ID is looked up as follows:<br>
    <br>
    1.  Is there a registrationID already loaded/cached?<br>
         Yes:<br>
               Is the registration invalid (has the app been
    unregistered or uninstalled or updated)<br>
                Yes: Fetch a New Id<br>
                No: Use the current Id<br>
         No: Fetch a New id<br>
    2. Put the ID in the programs shared preferences file.<br>
    <br>
    This is done during the asycnhronous Registrar.register method. </div></blockquote><div><br></div><div style>Ah, ok - sounds good!</div><div style><br></div><div style>Now, looking at:</div><div style><a href="https://gist.github.com/secondsun/242063868b09db030331#file-application-java-L7">https://gist.github.com/secondsun/242063868b09db030331#file-application-java-L7</a><br>
</div><div style><br></div><div style>Not sure, but would it make sense to make the setDeviceToken(), internal? Since it does not make much sense for the developer</div><div style>to call it anyways, since the Registrar.register() does that job.</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 bgcolor="#FFFFFF" text="#000000">

    Google posted a bucket of sample code for how to do this.  <br></div></blockquote><div><br></div><div style>Something to read for me, tomorrow :)</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 bgcolor="#FFFFFF" text="#000000"><div class="im">
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div class="gmail_extra">
            <div class="gmail_quote">
              <div><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"><br>
                <br>
                One of the reservations I&#39;ve heard is whether or not the
                PushConfig<br>
                object should only have the data sent to pushee in it
                and put other<br>
                configuration elsewhere or if it should be the generic
                push<br>
                configuration object and let AG pick out what it needs
                to send to pushee.<br>
              </blockquote>
              <div><br>
              </div>
              <div>I am fine, if the ctor accepts the
                RegistrationId, if it is clear (e.g. in document, or
                where else), that it used the intent, like here:</div>
              <div><a href="http://developer.android.com/reference/com/google/android/gcm/GCMBaseIntentService.html#GCMBaseIntentService%28java.lang.String.." target="_blank">http://developer.android.com/reference/com/google/android/gcm/GCMBaseIntentService.html#GCMBaseIntentService(java.lang.String..</a>.)<br>

              </div>
              <div><br>
              </div>
              <div>and _not_ being submitted to the
                UnifiedPush, when storing the &quot;metadata&quot;.</div>
              <div><br>
              </div>
              <div>(could be confusing, e.g. when looking at
                the HTTP /device/register endpoint description - but I
                may be wrong)</div>
            </div>
          </div>
        </div>
      </div>
    </blockquote></div>
    The idea would be to hide as much of this from the user as possible
    (def all of the registration w/ pushee stuff). </div></blockquote><div><br></div><div style>yeah, reasonable </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 bgcolor="#FFFFFF" text="#000000"> As a note,
    GCMBaseIntentService is deprecated.</div></blockquote><div style><br></div><div style>yup, just saw that </div><div style><br></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 bgcolor="#FFFFFF" text="#000000">  All of the Google messaging is
    now done via consuming a broadcast intent.</div></blockquote><div><br></div><div style>just saw your code.</div><div style><br></div><div style><br></div><div style>So, the AGPushMessageReceiver than basically puts the received message into the &quot;status bar&quot;, for the user - right ? </div>
<div style><br></div><div style>Right now it puts the entire JSON string in there, right ? Any way to &quot;look&quot; for a certain key ? </div><div><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 bgcolor="#FFFFFF" text="#000000"><div class="im"><br>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div class="gmail_extra">
            <div class="gmail_quote">
              <div><br>
              </div>
              <div><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">
                <br>
                By unifying into a single config object we make the code
                simpler/more<br>
                approachable.  However if we slice it up a bit more
                finely we can<br>
                decouple pushee support from GCM if we want to have an
                AOSP flavor of<br>
                push messaging in the future.<br>
              </blockquote>
              <div><br>
              </div>
              <div>Not sure... (iOS SDK in mind): Perhaps it&#39;s
                good to keep &quot;PushConfig&quot; for the PushEE-Metadata.</div>
              <div>That allows us to keep the SenderID for a
                (later) Convenience Intent? Not sure... mostly thinking
                out loud </div>
              <div><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">
                <br>
                wdyt?<br>
                <br>
                PS and by pushee I mean aerogear-unified-push-server.<br>
                _______________________________________________<br>
                aerogear-dev mailing list<br>
                <a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">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>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
aerogear-dev mailing list
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></pre>
    </blockquote>
    <br>
  </div></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>