Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Genymotion GPS is not getting my current position

Tags:

genymotion

As the title says, my genymotion is getting the static position declared in the gps options. Theres another option that I could get my current position? Im using cordova application testing with genymotion.

like image 399
fsi Avatar asked Dec 25 '22 02:12

fsi


2 Answers

Genymotion does not plug the GPS position to your computer's position.

If you want to customize your position you can do it on several ways:

  • Use the GPS Widget (free feature) located on the right bar of the device. You can either set manually GPS data or use the Map view to do it easily
  • Use the Genyshell (free feature) to script the positions injection.
  • Use the Java API (paid feature). By including the JAR of this feature you can control the GPS and other device sensors. This feature is very useful to improve code coverage, for unit testing for example.
like image 129
eyal-lezmy Avatar answered Jan 21 '23 08:01

eyal-lezmy


I was using cordova geolocation plugin.

navigator.geolocation.getCurrentPosition(onSuccess,onError,options);

And I was also facing the same problem, It wasn't working in genymotion. Setting enableHighAccuracy to true worked for me like below.

    var options = {
      enableHighAccuracy: true,
      maximumAge: 0
    };
like image 24
www.amitpatil.me Avatar answered Jan 21 '23 07:01

www.amitpatil.me