<div dir="ltr">Hello, Michi,<div><br></div><div>I *think* you hit a spot, where we are currently having some issues (see [1]).</div><div><br></div><div>Once we agreed on a solution there, it should not be to hard to get that fixed in both: &#39;master&#39; and the 0.10.x branch of the UnifiedPush Server. </div>
<div><br></div><div>[1] <a href="http://aerogear-dev.1069024.n5.nabble.com/aerogear-dev-Differences-between-Firefox-OS-quot-native-quot-Push-lib-and-AeroGear-s-Push-adapter-td6195.html">http://aerogear-dev.1069024.n5.nabble.com/aerogear-dev-Differences-between-Firefox-OS-quot-native-quot-Push-lib-and-AeroGear-s-Push-adapter-td6195.html</a></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 1, 2014 at 8:50 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,<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>
<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>