This is a migrated thread and some comments may be shown as answers.

android ajax/gps connectivity problems

4 Answers 52 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Michael
Top achievements
Rank 1
Michael asked on 25 Oct 2013, 06:28 PM
I am developing a hybrid mobile app with icenium. There are two troubling issues when testing on android devices:

1) many ajax calls fail and return a 404 error

2) attempts to grab gps coordinates using the geolocation feature fails.

There are no such issues on iOS devices. I am wondering if these are common issues, or if there is a procedure to follow for looking into the problems.

4 Answers, 1 is accepted

Sort by
0
Kristian D. Dimitrov
Telerik team
answered on 29 Oct 2013, 01:09 PM
Hi Michael,

For the GPS issue try setting the enableHighAccurancy option to true and set maximumAge and timeout options to higher value like this:

navigator.geolocation.getCurrentPosition(onSuccess, onError, {
  enableHighAccuracy: true,
  timeout: 10000,
  maximumAge: 7000
});


Check if you haven't turned off some of the needed android Permissions in Project Properties.

If that doesn't do the trick you might try restarting the phone.



In order to help you with the ajax issue, I will need some more information. To where the ajax requests are sent (server, local file system)? Have you tried if a plain XMLHttpRequst works fine?



Regards,

Kristian D. Dimitrov
Telerik

You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.

Looking for tips & tricks directly from the Icenium team? Check out our blog!

Share feedback and vote for features on our Feedback Portal.
0
Michael
Top achievements
Rank 1
answered on 31 Oct 2013, 01:36 AM
Looks like everything is running well for the time being.

Thanks
- Stephen
0
Jeremy
Top achievements
Rank 1
answered on 28 Feb 2014, 05:46 AM
Hi Kristian,

I have tried the same setting in my app but when I set enableHighAccuracy: true, application is not returning location and even I have set my geo location also on with all required permission, even when I am trying to run sample app then that is also not working. when I am setting it false that works correct.

Do you know what is the issue behind this?

Thanks,
Amit
0
Zdravko
Telerik team
answered on 04 Mar 2014, 10:26 AM
Hi Jeremy,

The lack of strong GPS connection is probably the reason for this behavior on Android device.
You can try our KendoUI template available in AppBuilder clients and check its implementation.

Furthermore try watchPosition method (if you haven't) in order to update the current position and if this does not help refer your issue to Cordova's issue tracker as they are the developers of the plugin.

Meanwhile we will contact you if we find anything new on your case.

Regards,
Zdravko
Telerik
Icenium is now Telerik AppBuilder, and is part of the Telerik Platform. For more information on the new name, and to learn more about the Platform, register for the free online keynote and webinar on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT)
Tags
General Discussion
Asked by
Michael
Top achievements
Rank 1
Answers by
Kristian D. Dimitrov
Telerik team
Michael
Top achievements
Rank 1
Jeremy
Top achievements
Rank 1
Zdravko
Telerik team
Share this question
or