dale
Posts: 0
Joined: Fri Mar 29, 2013 5:28 pm

Running geolocation via js .execute - no success return if connected via wifi.

Hi,

I am running the GeolocationService via geolocation2.execute({});

If I do not have WiFi enabled on my phone, and use the mobiles internet connection, the location is retrieved and a Success event is returned.

If I do have WiFi enabled and not connected to the internet through it (using internet connection on phone) the location is retrieved (I can see local labels are set to lat/long values), but I do not receive a Success value return - it just hangs (no failure return either).

Thanks,

Dale.

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Running geolocation via js .execute - no success return if connected via wifi.

Hello.

Do you have any errors on console?

dale
Posts: 0
Joined: Fri Mar 29, 2013 5:28 pm

Running geolocation via js .execute - no success return if connected via wifi.

No errors in console when testing.

I can only see the error when running it on a mobile phone.

If I run PhoneGap geolocation.getCurrentPosition - location positions are always returned with a success event - it doesn't matter about the state of the wifi connection at all.

I'd rather not going down this route as I like the mapping features of Appery.

Thankyou.

Dale.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Running geolocation via js .execute - no success return if connected via wifi.

Does it work fine if you invoke the Geolocation service via Run Service action, instead of invoking from JavaScript?

dale
Posts: 0
Joined: Fri Mar 29, 2013 5:28 pm

Running geolocation via js .execute - no success return if connected via wifi.

Hi Max,
No it doesn't work when I invoke service via an event.

On further tests, if I only have Wifi on, but with no phone data connection at all, the same thing happens.
So it seems that having Wifi turned on causes the issue maybe on phone (note that all runs OK on a laptop connected only to Wifi - but I know that's different).

Thanks,

Dale.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Running geolocation via js .execute - no success return if connected via wifi.

If you run the first Quick Example from: http://docs.phonegap.com/en/2.4.0/cor... -- does it work?

dale
Posts: 0
Joined: Fri Mar 29, 2013 5:28 pm

Running geolocation via js .execute - no success return if connected via wifi.

Yes, it does, already tried that (above).

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Running geolocation via js .execute - no success return if connected via wifi.

I will file this as a bug.. I don't know why it happens. As a workaround, use Apache Cordova (PhoneGap) API directly for now.

Return to “Issues”