Incorrect GPS location reported by Google maps in Genymotion

半城伤御伤魂 提交于 2020-01-14 04:41:06

问题


I'm using the Genymotion emulator to test my android application that needs location with GPS.

When I launch the Google Maps application, it gives me an incorrect location. Anyone have any idea about that?


回答1:


There is several solutions for your problem:

  • You can choose the GPS position of a Genymotion emulator thanks to the GPS widget on the right side of the screen.

  • You can also do it by shell commmand, look at the documentation here

  • Or, if you have a pro license, you can do it by the Java API (for unit test for example).




回答2:


You need both the GPS on in Genymotion (where you can set the location it reports to the device as above) PLUS you need to turn on location services on the virtual device itself (under Settings/Location Services for 4.1.1 - may vary a little depending on which version of Android you are emulating).



来源:https://stackoverflow.com/questions/23438957/incorrect-gps-location-reported-by-google-maps-in-genymotion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!