<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 06/13/2013 03:11 PM, Matthias
      Wessendorf wrote:<br>
    </div>
    <blockquote
cite="mid:CAAg5f2R6eAukNi+4PNbN7a=EoL32p6fGgHd4+VsWXC7rVoZjkA@mail.gmail.com"
      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
                  moz-do-not-send="true"
                  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! &nbsp;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 moz-do-not-send="true"
                  href="https://gist.github.com/secondsun/242063868b09db030331"
                  target="_blank">https://gist.github.com/secondsun/242063868b09db030331</a></blockquote>
              <div><br>
              </div>
              <div style="">the Callback (on r.register()), is success
                invoked, when PushEE returns HTTP Status 20x (for
                successful REGISTRATION of the device (aka
                "MobileVariantInstance"), right?</div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    Correct<br>
    <blockquote
cite="mid:CAAg5f2R6eAukNi+4PNbN7a=EoL32p6fGgHd4+VsWXC7rVoZjkA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div class="gmail_extra">
            <div class="gmail_quote">
              <div style="">Similar, the 'failure' is invoked when
                PushEE returns any error code (e.g. no connection, or
                404 or what ever), right ?</div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    Correct<br>
    <blockquote
cite="mid:CAAg5f2R6eAukNi+4PNbN7a=EoL32p6fGgHd4+VsWXC7rVoZjkA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div class="gmail_extra">
            <div class="gmail_quote">
              <div style=""><br>
              </div>
              <div style=""><br>
              </div>
              <div style="">BTW. is the PushConfig "magically" receiving
                the regId, from the Intent's onRegistered()? <br>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    Ha ha on Registered, that is so 3 weeks ago.&nbsp; Google trashed that
    API and provided us with a new shiny one!<br>
    <br>
    The reg ID is looked up as follows:<br>
    <br>
    1.&nbsp; Is there a registrationID already loaded/cached?<br>
    &nbsp;&nbsp;&nbsp;&nbsp; Yes:<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Is the registration invalid (has the app been
    unregistered or uninstalled or updated)<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Yes: Fetch a New Id<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No: Use the current Id<br>
    &nbsp;&nbsp;&nbsp;&nbsp; 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.&nbsp;
    Google posted a bucket of sample code for how to do this.&nbsp; <br>
    <br>
    <blockquote
cite="mid:CAAg5f2R6eAukNi+4PNbN7a=EoL32p6fGgHd4+VsWXC7rVoZjkA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div class="gmail_extra">
            <div class="gmail_quote">
              <div><br>
              </div>
              <div>&nbsp;</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'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 style="">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 style=""><a moz-do-not-send="true"
href="http://developer.android.com/reference/com/google/android/gcm/GCMBaseIntentService.html#GCMBaseIntentService%28java.lang.String..">http://developer.android.com/reference/com/google/android/gcm/GCMBaseIntentService.html#GCMBaseIntentService(java.lang.String..</a>.)<br>
              </div>
              <div style=""><br>
              </div>
              <div style="">and _not_ being submitted to the
                UnifiedPush, when storing the "metadata".</div>
              <div style=""><br>
              </div>
              <div style="">(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>
    The idea would be to hide as much of this from the user as possible
    (def all of the registration w/ pushee stuff).&nbsp; As a note,
    GCMBaseIntentService is deprecated.&nbsp; All of the Google messaging is
    now done via consuming a broadcast intent.<br>
    <blockquote
cite="mid:CAAg5f2R6eAukNi+4PNbN7a=EoL32p6fGgHd4+VsWXC7rVoZjkA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div class="gmail_extra">
            <div class="gmail_quote">
              <div style=""><br>
              </div>
              <div style=""><br>
              </div>
              <div>&nbsp;</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. &nbsp;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 style="">Not sure... (iOS SDK in mind): Perhaps it's
                good to keep "PushConfig" for the PushEE-Metadata.</div>
              <div style="">That allows us to keep the SenderID for a
                (later) Convenience Intent? Not sure... mostly thinking
                out loud&nbsp;</div>
              <div><br>
              </div>
              <div>&nbsp;</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 moz-do-not-send="true"
                  href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
                <a moz-do-not-send="true"
                  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 moz-do-not-send="true"
              href="http://matthiaswessendorf.wordpress.com/"
              target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
            sessions: <a moz-do-not-send="true"
              href="http://www.slideshare.net/mwessendorf"
              target="_blank">http://www.slideshare.net/mwessendorf</a><br>
            twitter: <a moz-do-not-send="true"
              href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
aerogear-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/aerogear-dev">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></pre>
    </blockquote>
    <br>
  </body>
</html>