android ajax/gps connectivity problems

5 posts, 1 answers
  1. Answer
    Michael avatar
    151 posts
    Member since:
    Jan 2012

    Posted 25 Oct 2013 Link to this post

    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.
  2. Kristian D. Dimitrov
    Kristian D. Dimitrov avatar
    68 posts

    Posted 29 Oct 2013 Link to this post

    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?


    Kristian D. Dimitrov

    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.
  3. Michael
    Michael avatar
    151 posts
    Member since:
    Jan 2012

    Posted 30 Oct 2013 Link to this post

    Looks like everything is running well for the time being.

    - Stephen
  4. Jeremy
    Jeremy avatar
    4 posts
    Member since:
    Sep 2011

    Posted 27 Feb 2014 in reply to Kristian D. Dimitrov Link to this post

    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?

  5. Zdravko
    Zdravko avatar
    657 posts

    Posted 04 Mar 2014 Link to this post

    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.

    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)
Back to Top