yes, alias/clientIdentifier &quot;<a href="mailto:luke@force.org">luke@force.org</a>&quot;<div><br></div><div><br>On Tuesday, June 4, 2013, Lucas Holmquist  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><br><div><div>On Jun 4, 2013, at 11:55 AM, Matthias Wessendorf &lt;<a>matzew@apache.org</a>&gt; wrote:</div><br><blockquote type="cite"><div dir="ltr">based on the &quot;unification issues&quot; (see old thread), Dan, Kris and I met<div>
<br></div><div><br></div><div>here is what we have come up with:</div><div><br></div><div><br></div><div><br></div><div><br>
</div><div><h2 style="margin-right:0px;margin-bottom:15px;margin-left:0px;padding:0px;font-size:2em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);font-family:Helvetica,arial,freesans,clean,sans-serif;margin-top:0px!important">

Draft for the AeroGear Push Message Format</h2><p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.454545021057129px;line-height:22.727272033691406px">The Unified Push Server allows two different ways to send message to the native Push API, of the supported devices:</p>

<ul style="margin:15px 0px;padding:0px 0px 0px 30px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.454545021057129px;line-height:22.727272033691406px"><li>broadcast<ul style="margin:0px;padding:0px 0px 0px 30px">

<li>to all <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">MobileVariants</code> and their <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">MobileVariant Instances</code> (devices)</li>

<li>to one specific <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">MobileVariant</code> and its <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">MobileVariant Instances</code> (devices)</li>

</ul></li><li>selective Send</li></ul><h3 style="margin:1em 0px 15px;padding:0px;font-size:1.5em;font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="13f105ee077f3653_13f105ee077f3653_broadcast" href="https://gist.github.com/matzew/d6f1b88b85e2f6c18031#broadcast" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px" target="_blank"><span></span></a>Broadcast</h3>

<pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(221,221,221);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">
<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">curl -v -H &quot;Accept: application/json&quot; -H &quot;Content-type: application/json&quot; 
   -H &quot;ag-push-application: {PushApplicationID}
   -H &quot;ag-mobile-variant: {MobileVariantID}
   -X POST
   -d &#39;{&quot;key&quot;:&quot;value&quot;, &quot;alert&quot;:&quot;HELLO!&quot;, &quot;sound&quot;:&quot;default&quot;, &quot;badge&quot;:7,
       &quot;simple-push&quot;:&quot;version=123&quot;}&#39;

<a href="http://localhost:8080/ag-push/rest/sender/broadcast" target="_blank">http://localhost:8080/ag-push/rest/sender/broadcast</a> 
</code></pre><p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.454545021057129px;line-height:22.727272033691406px">If the <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">ag-push-application</code> header is used, a message is send to a <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap"></code></p>
</div></div></blockquote><div>will the selective send also be able to send to 1 instance.  so send to my device not yours</div><br><blockquote type="cite"><div dir="ltr"><div><h4 style="margin:1em 0px 15px;padding:0px;font-size:1.2em;font-family:Helvetica,arial,freesans,clean,sans-serif">
Message Format</h4><p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.454545021057129px;line-height:22.727272033691406px">Besides the actual payload the API accepts a few <em>classifiers</em> to select a subset of registered devices.</p>

<h5 style="margin:1em 0px 15px;padding:0px;font-size:1em;font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:22.727272033691406px"><a name="13f105ee077f3653_13f105ee077f3653_query-component" href="https://gist.github.com/matzew/d6f1b88b85e2f6c18031#query-component" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px" target="_blank"><span></span></a>Query component</h5>
<p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.454545021057129px;line-height:22.727272033691406px">Currently the Server will support the following query criterias:</p>
<ul style="margin:15px 0px;padding:0px 0px 0px 30px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.454545021057129px;line-height:22.727272033691406px"><li><code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">alias</code>: A list of email address (or usernames) to send messages to <em>ALL</em> devices of the users. The<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">alias</code> needs to be stored, when the device is registering itself with the server. See here for <a href="https://github.com/matzew/ag-client-push-sdk/blob/master/push-sdk/AGClientDeviceInformation.h#L48-L52" style="color:rgb(65,131,196);text-decoration:none" target="_blank">details</a></li>

<li><code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">deviceType</code>: A list of raw devices types that should receive the message (e.g. Coupon only for iPad and AndroidTablets). The <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">deviceType</code> needs to be stored, when the device is registering itself with the server. See here for <a href="https://github.com/matzew/ag-client-push-sdk/blob/master/push-sdk/AGClientDeviceInformation.h#L43-L46" style="color:rgb(65,131,196);text-decoration:none" target="_blank">details</a>. <em><strong>NOTE:</strong></em> For SimplePush, the <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">deviceType</code> is <strong>ONLY</strong> <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">web</code>. No specifics on the actual device are used due to general limitations on &quot;user agent sniffing&quot;.</li>

</ul><h5 style="margin:1em 0px 15px;padding:0px;font-size:1em;font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:22.727272033691406px"><a name="13f105ee077f3653_13f105ee077f3653_message-payload" href="https://gist.github.com/matzew/d6f1b88b85e2f6c18031#message-payload" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px" target="_blank"><span></span></a>Message Payload</h5>
<p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15.454545021057129px;line-height:22.727272033691406px">The message format is very simple: A generic JSON map is used to send messages to Android and iOS devices. The applications on the devices will receive the JSON map and are responsible for performing a lookup to read values of t</p>
</div></div>
_______________________________________________<br>aerogear-dev mailing list<br><a href="javascript:_e({}, &#39;cvml&#39;, &#39;aerogear-dev@lists.jboss.org&#39;);" 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></blockquote>
</div><br></div></blockquote></div><br><br>-- <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><br>