Bob Fludder
Posts: 0
Joined: Fri Sep 14, 2012 1:09 am

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

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

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

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

Hello Bob,

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

Bob Fludder
Posts: 0
Joined: Fri Sep 14, 2012 1:09 am

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

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.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

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

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.

Bob Fludder
Posts: 0
Joined: Fri Sep 14, 2012 1:09 am

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

Yurii,

Thought so and does make sense.

Thanks

Bob

Return to “Issues”