<div dir="ltr">Hum,<div>That makes me think that we should maybe implement the push.registrations() function as Mozilla does : </div><div><br></div><div><a href="https://developer.mozilla.org/en-US/docs/Web/API/PushManager.registrations">https://developer.mozilla.org/en-US/docs/Web/API/PushManager.registrations</a><br>
</div><div><br></div><div>This is really helpful to iterate over existing registrations,  not sure about the security implications but yeah they provide it ...</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Apr 1, 2014 at 10:00 PM, Matthias Wessendorf <span dir="ltr">&lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="">On Tue, Apr 1, 2014 at 9:57 PM, Michi Oshima <span dir="ltr">&lt;<a href="mailto:michi.oshima@gmail.com" target="_blank">michi.oshima@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Sebastian,  <div><br></div><div>It makes sense, but I do need the value of pushEndpoint <a href="https://github.com/aerogear/aerogear-simplepush-unifiedpush-quickstart/blob/master/js/unifiedpush.js#L33" target="_blank">in this another line</a>.  After the initial call to register(), pushEndpoint doesn&#39;t get returned any more by the subsequent register() calls.  </div>

</div></blockquote><div><br></div></div><div>I *think* it was done for security reasons (pushEndpoint only on initial register, and not on re-registering). </div><div><div class="h5"><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">
<div><br></div><div>Hm.  Is the endpoint object what&#39;s stored in the local store?  That&#39;d make sense, yes.</div><div><br></div><div><ul><li>ag-push-store<span style="white-space:pre-wrap">        </span>{&quot;channels&quot;:[{&quot;requestObject&quot;:{},&quot;channelID&quot;:&quot;68e000dd-c0d9-42f1-9527-06b1c149d7f6&quot;,&quot;state&quot;:&quot;used&quot;}],&quot;uaid&quot;:&quot;5c557248-ed2d-4af3-8e9e-2ea2889e9730&quot;}</li>


</ul></div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 1, 2014 at 3:47 PM, Sebastien Blanc <span dir="ltr">&lt;<a href="mailto:scm.blanc@gmail.com" target="_blank">scm.blanc@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">And in the mean time, while we find a proper way to fix that,  you can  remove the check you mention here <span style="font-family:arial,sans-serif;font-size:12.800000190734863px"> = &gt; </span><a href="https://github.com/aerogear/aerogear-simplepush-unifiedpush-quickstart/blob/master/js/unifiedpush.js#L29" style="font-family:arial,sans-serif;font-size:12.800000190734863px" target="_blank">in this line</a> , this way it  will always call the registration, the first time it will create a new installation in UPS but after that it will just do an update. Might not be the most efficient as you do a call each time you connect your app but it&#39;s not that big impact (And this way you are sure it updates the UPS in case you add a category, change the alias ...) </div>



<div class="gmail_extra"><br><br><div class="gmail_quote"><div>On Tue, Apr 1, 2014 at 9:33 PM, Lucas Holmquist <span dir="ltr">&lt;<a href="mailto:lholmqui@redhat.com" target="_blank">lholmqui@redhat.com</a>&gt;</span> wrote:<br>



</div><div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">we store some things in local-storage,  so you would need to delete that record.<div>



<br></div><div>if you are using chrome, you can use the dev tools and go to the resources tab and delete the record that is aerogear-push(?),  i think thats the name,  i don&#39;t have it in front of me</div><div><br></div>



<div><br><div><div><div><div>On Apr 1, 2014, at 2:50 PM, Michi Oshima &lt;<a href="mailto:michi.oshima@gmail.com" target="_blank">michi.oshima@gmail.com</a>&gt; wrote:</div><br></div></div><blockquote type="cite">
<div><div><div dir="ltr">Hi,<div><br></div><div>I&#39;m trying to adapt the sample code under <a href="https://github.com/aerogear/aerogear-simplepush-unifiedpush-quickstart" target="_blank">aerogear-simplepush-unifiedpush-quickstart</a> for my application.  I&#39;m having a problem inside <a href="https://github.com/aerogear/aerogear-simplepush-unifiedpush-quickstart/blob/master/js/unifiedpush.js#L15" target="_blank">spConnect() function</a>.</div>




<div><br></div><div>When I first ran my code PushManager.register() call was successful, and it returned a pushEndpoint.  But I had mistyped the code somewhere below and I never got to call <a href="https://github.com/aerogear/aerogear-simplepush-unifiedpush-quickstart/blob/master/js/unifiedpush.js#L50" target="_blank">UPClient.registerWithPushServer(...)</a>.</div>




<div><br></div><div>Every subsequent run of the spConnect() function skips the line to call UPClient.registerWithPushServer(...), because PushManager.register() call doesn&#39;t return a pushEndpoint.  (That&#39;s what you check <a href="https://github.com/aerogear/aerogear-simplepush-unifiedpush-quickstart/blob/master/js/unifiedpush.js#L29" target="_blank">in this line</a>, correct?)</div>




<div><br></div><div>I&#39;m guessing that I am somehow successfully registered with the simple push server, but not with the unified push server.  I&#39;m very new to AeroGear, so I&#39;m not at all sure.</div><div><br></div>




<div><ol><li>How should I best recover from this?  <br></li><li>If I&#39;m correct about what&#39;s going on, how should I rearrange the code so that I can properly handle the situation where I&#39;m registered with the simple push server but not with the unified push server?<br>




</li></ol></div><div>Thank you,</div><div><br></div><div>Michi Oshima</div></div></div></div><div>
_______________________________________________<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></div>



</blockquote></div><br></div></div><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></div></div><br></div>
<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></div>
</div></div><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></div></div><br><br clear="all"><div class=""><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>_______________________________________________<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></div>