Page 1 of 1

Not getting either a fail or completion event from a rest service

Posted: Tue Jul 07, 2015 8:32 am
by Bob Fludder

Hi. I have set up a rest service that checks a certain web site. If it gets a response I'm assuming I have a connection. The problem I have is that when I have wi-fi off I don't get a fail or complete response (this is a wi-fi only device). Is there something else I can try perhaps - just want to know if on-line or not? Oh and navigator.onLine says true even with wi-fi off as well. This is on a samsung tab running android 4.1.2 and I have the sdk minimum build at 4.1


Not getting either a fail or completion event from a rest service

Posted: Tue Jul 07, 2015 4:14 pm
by Evgene Karachevtsev

Hello Bob,

Please look at this link, it should be useful for you:
https://getsatisfaction.com/apperyio/...


Not getting either a fail or completion event from a rest service

Posted: Wed Jul 08, 2015 3:50 am
by Bob Fludder

Thanks Evgene that was actually useful and it reminded me that there is something in one of your tutorials as well.

Turns out though the problem was that a bit of javascript was failing. I have some "global" variables being defined within one of my scripts. In here I defined 2 variables:
var mapOptions = { mapTypeId: google.maps.MapTypeId.ROADMAP };
var directionsDisplay = new google.maps.DirectionsRenderer();

But the app has no internet connection so therefore (and I'm assuming stuff here) it hasn't/can't download the javascript for google maps api. Because of that any reference to google.maps..... etc is undefined and the script was stopping and not loading fully but when it did have a connection everything ran fine.

Am I right when I say that the google api's are downloaded from the web and not included in the app ? If so are there more javascript or css files downloaded when the app starts ? This may well explain some other issues I have.


Not getting either a fail or completion event from a rest service

Posted: Tue Jul 28, 2015 12:37 am
by Yurii Orishchuk

Hi Bob,

Yes, google map component is to big to be embed into binary. Also it needs some online sources like map pictures etc..

So unfortunatly google map component could not work without internet connection.

Regards.


Not getting either a fail or completion event from a rest service

Posted: Tue Jul 28, 2015 9:25 am
by Bob Fludder

Yurii,

Thought so and does make sense.

Thanks

Bob