Crosswalk and geolocation

#1

I fixed a lot of framerate and jagginess issues with crosswalk by following this tutorial : https://blog.nraboy.com/2014/10/use-crosswalk-ionic-framework-android-apps/

Every feature i tested works better with crosswalk except geolocation. Anybody got any tips or experience with that? it just does not get a fix and times out!

EDIT: Low accuracy works, high accuracy (gps) does not… also, trying high followed rapidly afterwards by low does not work but low alone works. As if i should let the gps process finish completely by adding a little delay… and let the icon disappear, then try again with low accuracy… weird.

I tried using intel.xdk.geolocation.getCurrentPosition instead of navigator.geolocation.getCurrentPosition but for that i think I need to include <script src="intelxdk.js"></script> but it does not work. (crosswalk is supposed to serve this file automatically in the build process, like cordova.js)

This does not work for me, Anybody has experience with crosswalk and ionic and intelxdk.js??

#2

Hmm, so this happens with the browser based geolocation?

Have you tried using cordova’s geolocation plugin?

#3

Just switch off your phone then switch it back on. It works. I use $cordovaGeoLocation provider. I don’t have the cordova-geo-location plugin as it is deprecated.

Just turn on location and reboot your phone once. It should work. You have to do it only one time though.

#4

Thanks ,I was having hard time to figure out why geolocation is not working in android , finally restart do the trick :smile:

#5

Thanks for this tip. I feel like Roy in the “IT Crowd”… “Have you tried turning it off and on again?”. Remarkable how the simplest things sometimes works… :smiley:

#6

Can anyone help me with this issue, after installing the crosswalk plugin the geolocation plugin return as empty object. i have gone through all the solutions on the internet but no luck please help wasted a lot of time on this.

#7

Maybe on android you should not use an gelolocation plugin and just use the native geolocation.

#8

boltex bro, i have tried the native geolocation (browser based) as well still getting an empty object. restarting the device wont help either. BTW m using this cordova-plugin-crosswalk-webview 1.3.1 “Crosswalk WebView Engine”, If i remove this plugin then i receive the object with coordinates. Any idea what’s wrong with it. The device m working on is android version 4.2.1 and the plugin m using for location is cordova’s geolocation plugin.

#9

oh… i never used that plugin. dont know much about that.

good luck and don’t forget to report your findings ! :smile: