<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><!DOCTYPE HTML></div><div><html></div><div><head></div><div> <title>Demo</title></div><div></head></div><div><body></div><div><br></div><div><script type="text/javascript" charset="utf-8" src="cordova.js"></script></div><div><script type="text/javascript" charset="utf-8" src="jquery_1.5.2.min.js"></script></div><div><br></div><div><script type="text/javascript"></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> // 'load', 'deviceready', 'offline', and 'online'.</div><div><span class="" style="white-space:pre">                </span> bindEvents: function() {</div><div><span class="" style="white-space:pre">                </span> document.addEventListener('deviceready', 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 'this' is the event. In order to call the 'receivedEvent'</div><div><span class="" style="white-space:pre">                </span> // function, we must explicitly call 'app.receivedEvent(...);'</div><div><span class="" style="white-space:pre">                </span> onDeviceReady: function() {</div><div><span class="" style="white-space:pre">                </span> app.receivedEvent('deviceready');</div><div><span class="" style="white-space:pre">                </span> var pushConfig = {</div><div><span class="" style="white-space:pre">                </span> pushServerURL: "<a href="http://192.168.1.40:8080/ag-push/">http://192.168.1.40:8080/ag-push/</a>",</div><div><span class="" style="white-space:pre">                </span> android: { </div><div><span class="" style="white-space:pre">                </span> senderID: "",</div><div><span class="" style="white-space:pre">                </span> variantID: "",</div><div><span class="" style="white-space:pre">                </span> variantSecret: ""</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('success')</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('error ' + 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('.listening');</div><div><span class="" style="white-space:pre">                </span> var receivedElement = parentElement.querySelector('.received');</div><div><br></div><div><span class="" style="white-space:pre">                </span> listeningElement.setAttribute('style', 'display:none;');</div><div><span class="" style="white-space:pre">                </span> receivedElement.setAttribute('style', 'display:block;');</div><div><br></div><div><span class="" style="white-space:pre">                </span> console.log('Received Event: ' + 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('deviceready', onDeviceReady, true);</div><div><br></div><div></script></div><div><div id="home"></div><div> <div id="app-status-div"></div><div> <ul id="app-status-ul"></div><div> <li>AeroGear PushPlugin Unified Push Demo</li></div><div> </ul></div><div> </div></div><div></div></div><div></body></div><div></html></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"><<a href="mailto:kurrent93@gmail.com" target="_blank">kurrent93@gmail.com</a>></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"><<a href="mailto:kurrent93@gmail.com" target="_blank">kurrent93@gmail.com</a>></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"><<a href="mailto:lholmqui@redhat.com" target="_blank">lholmqui@redhat.com</a>></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"><<a href="mailto:kurrent93@gmail.com" target="_blank">kurrent93@gmail.com</a>></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"><<a href="mailto:lholmqui@redhat.com" target="_blank">lholmqui@redhat.com</a>></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'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'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 "see" 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>