<div dir="ltr">Ok so I managed to deploy my cordova app onto genymotion. Actually that wasnt too difficult. <div>But, alas, it still does not connect to the UPS.</div><div><br></div><div>I have updated the pushServerURL value to use my hosts ip.</div><div><br></div><div>My index.html looks like this - I notice it is referencing cordova.js, but this file is missing in the eclipse project. I assume eclipse automagically adds it when the project is built.</div><div>Ive removed the send, variant and variant secret - to protect the identity of the innocent.</div><div><br></div><div><div>&lt;!DOCTYPE HTML&gt;</div><div>&lt;html&gt;</div><div>&lt;head&gt;</div><div>  &lt;title&gt;Demo&lt;/title&gt;</div><div>&lt;/head&gt;</div><div>&lt;body&gt;</div><div><br></div><div>&lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot; src=&quot;cordova.js&quot;&gt;&lt;/script&gt;</div><div>&lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot; src=&quot;jquery_1.5.2.min.js&quot;&gt;&lt;/script&gt;</div><div><br></div><div>&lt;script type=&quot;text/javascript&quot;&gt;</div><div><br></div><div>var app = {</div><div><span class="" style="white-space:pre">                </span>  // Application Constructor</div><div><span class="" style="white-space:pre">                </span>  initialize: function() {</div><div><span class="" style="white-space:pre">                </span>    this.bindEvents();</div><div><span class="" style="white-space:pre">                </span>  },</div><div><span class="" style="white-space:pre">                </span>  // Bind Event Listeners</div><div><span class="" style="white-space:pre">                </span>  //</div><div><span class="" style="white-space:pre">                </span>  // Bind any events that are required on startup. Common events are:</div><div><span class="" style="white-space:pre">                </span>  // &#39;load&#39;, &#39;deviceready&#39;, &#39;offline&#39;, and &#39;online&#39;.</div><div><span class="" style="white-space:pre">                </span>  bindEvents: function() {</div><div><span class="" style="white-space:pre">                </span>    document.addEventListener(&#39;deviceready&#39;, this.onDeviceReady, false);</div><div><span class="" style="white-space:pre">                </span>  },</div><div><span class="" style="white-space:pre">                </span>  // deviceready Event Handler</div><div><span class="" style="white-space:pre">                </span>  //</div><div><span class="" style="white-space:pre">                </span>  // The scope of &#39;this&#39; is the event. In order to call the &#39;receivedEvent&#39;</div><div><span class="" style="white-space:pre">                </span>  // function, we must explicitly call &#39;app.receivedEvent(...);&#39;</div><div><span class="" style="white-space:pre">                </span>  onDeviceReady: function() {</div><div><span class="" style="white-space:pre">                </span>    app.receivedEvent(&#39;deviceready&#39;);</div><div><span class="" style="white-space:pre">                </span>    var pushConfig = {</div><div><span class="" style="white-space:pre">                </span>      pushServerURL: &quot;<a href="http://192.168.1.40:8080/ag-push/">http://192.168.1.40:8080/ag-push/</a>&quot;,</div><div><span class="" style="white-space:pre">                </span>      android: { </div><div><span class="" style="white-space:pre">                </span>        senderID: &quot;&quot;,</div><div><span class="" style="white-space:pre">                </span>        variantID: &quot;&quot;,</div><div><span class="" style="white-space:pre">                </span>        variantSecret: &quot;&quot;</div><div><span class="" style="white-space:pre">                </span>      }</div><div><span class="" style="white-space:pre">                </span>    };</div><div><span class="" style="white-space:pre">                </span>push.register(app.onNotification, successHandler, errorHandler, pushConfig);</div><div><br></div><div><span class="" style="white-space:pre">                </span>function successHandler() {</div><div><span class="" style="white-space:pre">                </span>  console.log(&#39;success&#39;)</div><div><span class="" style="white-space:pre">                </span>}</div><div><br></div><div><span class="" style="white-space:pre">                </span>function errorHandler(message) {</div><div><span class="" style="white-space:pre">                </span>  console.log(&#39;error &#39; + message);</div><div><span class="" style="white-space:pre">                </span>}</div><div><span class="" style="white-space:pre">                </span>},</div><div><span class="" style="white-space:pre">                </span>onNotification: function(event) {</div><div><span class="" style="white-space:pre">                </span>  alert(event.alert);</div><div><span class="" style="white-space:pre">                </span>},</div><div><span class="" style="white-space:pre">                </span>// Update DOM on a Received Event</div><div><span class="" style="white-space:pre">                </span>receivedEvent: function(id) {</div><div><span class="" style="white-space:pre">                </span>  var parentElement = document.getElementById(id);</div><div><span class="" style="white-space:pre">                </span>  var listeningElement = parentElement.querySelector(&#39;.listening&#39;);</div><div><span class="" style="white-space:pre">                </span>  var receivedElement = parentElement.querySelector(&#39;.received&#39;);</div><div><br></div><div><span class="" style="white-space:pre">                </span>  listeningElement.setAttribute(&#39;style&#39;, &#39;display:none;&#39;);</div><div><span class="" style="white-space:pre">                </span>  receivedElement.setAttribute(&#39;style&#39;, &#39;display:block;&#39;);</div><div><br></div><div><span class="" style="white-space:pre">                </span>  console.log(&#39;Received Event: &#39; + id);</div><div><span class="" style="white-space:pre">                </span>}</div><div><span class="" style="white-space:pre">                </span>};</div><div><br></div><div><span class="" style="white-space:pre">                </span>app.initialize();</div><div><br></div><div>  document.addEventListener(&#39;deviceready&#39;, onDeviceReady, true);</div><div><br></div><div>&lt;/script&gt;</div><div>&lt;div id=&quot;home&quot;&gt;</div><div>  &lt;div id=&quot;app-status-div&quot;&gt;</div><div>    &lt;ul id=&quot;app-status-ul&quot;&gt;</div><div>      &lt;li&gt;AeroGear PushPlugin Unified Push Demo&lt;/li&gt;</div><div>    &lt;/ul&gt;</div><div>  &lt;/div&gt;</div><div>&lt;/div&gt;</div><div>&lt;/body&gt;</div><div>&lt;/html&gt;</div></div><div><br></div><div>Can anyone see anything obviously wrong?</div><div><br></div><div>How does one debug in such a situation?</div><div><br></div><div>Thanks</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 23, 2016 at 12:21 AM, Anton Hughes <span dir="ltr">&lt;<a href="mailto:kurrent93@gmail.com" target="_blank">kurrent93@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">Ok, I have managed to get setup with Genymotion, and have the google tools installed.<div><br></div><div>How, then, can I deploy the cordova project to the genymotion vm? Is there a way to do that from within Eclipse?</div><div><br></div><div>Thanks</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 22, 2016 at 2:35 PM, Anton Hughes <span dir="ltr">&lt;<a href="mailto:kurrent93@gmail.com" target="_blank">kurrent93@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">Thanks Luke. I will try this. </div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 22, 2016 at 2:31 PM, Luke Holmquist <span dir="ltr">&lt;<a href="mailto:lholmqui@redhat.com" target="_blank">lholmqui@redhat.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"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Fri, Jan 22, 2016 at 8:28 AM, Anton Hughes <span dir="ltr">&lt;<a href="mailto:kurrent93@gmail.com" target="_blank">kurrent93@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"><div class="gmail_extra"><span><br><div class="gmail_quote">On Fri, Jan 22, 2016 at 2:25 PM, Luke Holmquist <span dir="ltr">&lt;<a href="mailto:lholmqui@redhat.com" target="_blank">lholmqui@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">just a thought that popped into my head.   The url pointing to your UPS server shouldn&#39;t be localhost, since there is no localhost on the device.  not sure if thats how you have it configured, though. but this always bites me </blockquote></div><br></span>The wise expression of Homer Simpson comes rushing into mind!</div><div class="gmail_extra">I&#39;m away from my dev environment, so cannot test - but, yes I am using localhost in the cordova project.</div><div class="gmail_extra"><br></div><div class="gmail_extra">So if not localhost, then what? </div></div></blockquote></div></div><div>if you are running the UPS server on your local machine, then it would be your IP instead of localhost.  The device just needs to &quot;see&quot; it, so that means you need to be on the same network.   unless you are running it in the cloud or something </div><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org" target="_blank">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
<br></blockquote></span></div><br></div></div>
<br>_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org" target="_blank">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>