Fix for geolocation on Android/Intel xdk? [fixed]

0 favourites
  • 5 posts
  • Hi all, I'm trying to get geolocation to work on Android/Intel xdk. When I make changes, and reinstall on my device, it works perfectly at first. Shortly after, the plugin gets stuck trying to get a location. Any way to get it working reliably?



    The steps below seem to have fixed the issue. Now the stock geolocation plugin works on my nexus 5x (running official android 'N' beta). Geolocation has become much more intricate with these new phones. It can determine the location from GPS and GLANOS satellites, cell towers, wifi, etc. The location setting can also be modified on the phone to use all sources (high accuracy) or satellites only. With these hardware upgrades, the software still works, with the following method:

    Intel XDK:

    • Add the latest geolocation plugin (v2.2.0, this automatically adds an additional 'compat' plugin).

    C2 'geolocation' plugin:

    • open the plugin folder (Construct 2\exporters\html5\plugins\geolocation)
    • in the 'geolocation' folder open the 'edittime' java file (best to do with notepad++,

    'geolocation plugin:

    • look for this line: "rotatable": false, // only used when "type" is "world". Enables an angle property on the object.
    • enter this line under it: "cordova-plugins": "org.apache.cordova.geolocation"


    • When getting a new location use "High accuracy". I set the timeout to ten seconds.
    • During export I don't check "New Intel xdk project format", but I do check the "geolocation" permission.
    • I haven't tried the minify script, so I'm not sure if it would have any effect.

    It may not all be necessary, but this method made it work for my app on my device.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hello, can you shoot me a tip to get mine working? I an running the demo out of the templates and cant get geo to work. Says needs app permissions. I checked the box in C2, is there one I need to check in Intel XDK? If I can get mine working maybe I can help you with your bug. thanks.

  • On your phone go to settings > apps > (your app) > permissions.

  • Got it working thx, needed Geoloco in Intel XDK. Im running the template and only issue i see is that it dosesnt stop watching.

  • In c2 you have to "get location". Then use the same trigger.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)