<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">What other companies provide geofencing
      and what do their APIs look like?<br>
      I know Google has some stuff for Android buried in Google Play
      Services.<br>
      <br>
      In general I think it might be less big brother if instead of the
      user reporting their location we add in metadata to filter
      incoming messages.  This will have us sending more metadata but we
      don't have to worry about what if some bad guy compromises the
      server and start following his mother-in-law.<br>
      <br>
      <br>
      On 11/27/2014 11:52 AM, Sebastien Blanc wrote:<br>
    </div>
    <blockquote
cite="mid:CAD_dpu3WvsfxwJQvUXcaiqGVY9Pt1PMC7aBuXABq2UOVfxDuPw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <p
          style="margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe
UI',Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px;margin-top:0px!important">Hi
          Folks !</p>
        <p
          style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe
UI',Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">During
          our last f2f we agreed on adding some geolocation support for
          the next UnifiedPush Release (1.1). I would like to start here
          a thread to discuss this topic.</p>
        <p
          style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe
UI',Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">Let's
          keep in mind : <em>Crawl, Walk, Run</em></p>
        <p
          style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe
UI',Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">I
          would like to start with a concrete proposition and initiate
          the discussions from there :</p>
        <h1 style="font-size:2.25em;margin:1em 0px
          16px;line-height:1.2;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif"><a
            moz-do-not-send="true" name="user-content-installations"
            class=""
href="https://gist.github.com/sebastienblanc/d89e41b72c9de537dbde#installations"
            rel="noreferrer"
style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>Installations</h1>
        <h2
          style="margin-top:1em;margin-bottom:16px;line-height:1.225;font-size:1.75em;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif"><a
            moz-do-not-send="true" name="user-content-model-change"
            class=""
href="https://gist.github.com/sebastienblanc/d89e41b72c9de537dbde#model-change"
            rel="noreferrer"
style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>Model
          Change</h2>
        <p
          style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe
UI',Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">The
          idea is to add 2 new fields to the <code
            style="font-family:Consolas,'Liberation
            Mono',Menlo,Courier,monospace;font-size:14px;padding:0.2em
0px;margin:0px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgba(0,0,0,0.0392157)">Installation</code> Object
          :</p>
        <pre style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:14px;margin-top:0px;margin-bottom:16px;padding:16px;overflow:auto;line-height:1.45;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51);background-color:rgb(247,247,247)"><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:14px;padding:0px;margin:0px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-break:normal;border:0px;display:inline;line-height:inherit;word-wrap:normal;background:transparent">double longitude;
double latitude;

</code></pre>
        <p
          style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe
UI',Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">These
          field <strong>should</strong> be optional !</p>
        <h2
          style="margin-top:1em;margin-bottom:16px;line-height:1.225;font-size:1.75em;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif"><a
            moz-do-not-send="true" name="user-content-registration"
            class=""
href="https://gist.github.com/sebastienblanc/d89e41b72c9de537dbde#registration"
            rel="noreferrer"
style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>Registration</h2>
        <p
          style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe
UI',Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">When
          the device registers, along with alias, categories etc ... it
          will also be possible to pass a latitude and longitude.</p>
        <p
          style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe
UI',Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">Later,
          we will probably offer a endpoint to update these properties. <code
            style="font-family:Consolas,'Liberation
            Mono',Menlo,Courier,monospace;font-size:14px;padding:0.2em
0px;margin:0px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgba(0,0,0,0.0392157)">PUT
            /registry/device/{token}</code></p>
        <h1 style="font-size:2.25em;margin:1em 0px
          16px;line-height:1.2;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif"><a
            moz-do-not-send="true" name="user-content-sender" class=""
href="https://gist.github.com/sebastienblanc/d89e41b72c9de537dbde#sender"
            rel="noreferrer"
style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>Sender</h1>
        <h2
          style="margin-top:1em;margin-bottom:16px;line-height:1.225;font-size:1.75em;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif"><a
            moz-do-not-send="true" name="user-content-server-side"
            class=""
href="https://gist.github.com/sebastienblanc/d89e41b72c9de537dbde#server-side"
            rel="noreferrer"
style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>Server
          Side</h2>
        <p
          style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe
UI',Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">We
          need to extend the current sender API to be able to add
          geolocation as a criteria. I see that as something like :</p>
        <pre style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:14px;margin-top:0px;margin-bottom:16px;padding:16px;overflow:auto;line-height:1.45;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51);background-color:rgb(247,247,247)"><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:14px;padding:0px;margin:0px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-break:normal;border:0px;display:inline;line-height:inherit;word-wrap:normal;background:transparent">{
  "message":{
    "alert":"HELLO!
  },
  "criteria":{
   "geolocation":
       {
      "latitude" : 40.2566
      "longitude": 2.36556
      "within" : 5 
      "unit" : "Km" // optional, default is Km  
       }
  }
}

</code></pre>
        <p
          style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe
UI',Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">In
          this example, the Push Notification will be sent only to
          devices within a radius of 5 km of the supplied location.</p>
        <p
          style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe
UI',Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">On
          the implementation side, I think it make sense to use
          Hibernate Search since it has nice support for<a
            moz-do-not-send="true"
href="https://docs.jboss.org/hibernate/search/4.2/reference/en-US/html/spatial.html"
            rel="noreferrer"
            style="color:rgb(65,131,196);text-decoration:none">Spatial
            queries</a>.</p>
        <h2
          style="margin-top:1em;margin-bottom:16px;line-height:1.225;font-size:1.75em;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif"><a
            moz-do-not-send="true" name="user-content-sender-client"
            class=""
href="https://gist.github.com/sebastienblanc/d89e41b72c9de537dbde#sender-client"
            rel="noreferrer"
style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>Sender
          Client</h2>
        <p
          style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe
UI',Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">The
          different Sender Clients (Java, Node.js, .net) should be
          updated accordingly.</p>
        <h1 style="font-size:2.25em;margin:1em 0px
          16px;line-height:1.2;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif"><a
            moz-do-not-send="true" name="user-content-client-sdks"
            class=""
href="https://gist.github.com/sebastienblanc/d89e41b72c9de537dbde#client-sdks"
            rel="noreferrer"
style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px"></a>Client
          SDKs</h1>
        <p
          style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe
UI',Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">In
          this fisrt iteration, the registration code would to be
          updated to include latitude and longitude for :</p>
        <ul class="" style="padding:0px 0px 0px
          2em;margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe
UI',Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">
          <li>iOS (Including Safari ? )</li>
          <li>Android ( Including Chrome Apps ?)</li>
          <li>JS UPS-SPS Lib</li>
          <li>Cordova Plugin</li>
          <li>Amazon</li>
          <li>Windows</li>
        </ul>
        <p
          style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe
UI',Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">Retrieving
          the current position of the device is not in scope of this
          first version, later we could offer some features around that.</p>
        <p
          style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe
UI',Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">There
          are some jiras to track these tasks : <a
            moz-do-not-send="true"
            href="https://issues.jboss.org/browse/AGPUSH-828"
            rel="noreferrer"
            style="color:rgb(65,131,196);text-decoration:none">https://issues.jboss.org/browse/AGPUSH-828</a></p>
        <p
          style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe
UI',Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">Comments
          and questions welcome !</p>
        <p
          style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica
          Neue',Helvetica,'Segoe
UI',Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">Sebi</p>
      </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>
    <br>
    <pre class="moz-signature" cols="72">-- 
Summers Pittman
&gt;&gt;Phone:404 941 4698
&gt;&gt;Java is my crack.
</pre>
  </body>
</html>