问题
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