How to enable GPS in Eclipse Emulator for Android
Possible Duplicate:
How to emulate GPS location in the Android Emulator?
I'm struggling with activating the GPS functionality in the Android Emulator (Eclipse)
I wrote a test program for getting the current location. It's working on my Android Phone.. so I'm sure the app is working.
If I'm testing the program in the Android Emulator from Eclipse... nothing is happening! What am I missing?
I already added GPS support in the AVD I know the Emulator control... but nothing is happening in the app.
Do I need to install some extra futures in the SDK?
I hope someone can point me in the right direction!
With the emulator running, do a
telnet localhost 5554
to connect to the emulator. Then you can do several commands, for example:
geo fix (longitude) (latitude)
That command instructs the emulator to behave as if the phone was at those location (basically fake the GPS coordinates).
You can use google maps feature called "drop latlong marker" to get GPS coordinates for a particular place.
You just need to send latitude and longitude via Emulator Control under DDMS , no need to other things. pretty simple:)
the geo-fix solution works , but the eclipse ui solution should also work. you are not supposed to install anything special.
try to create a new emulator (which has gps support enabled in its features) and run it , select it in the emulators list under "devices" , and then go to the emulator control . set there the location and press "Send" .
in any case , if that doesn't work , you can even install third party apps on the emulator that do the same thing :
https://play.google.com/store/search?q=location+spoofer&c=apps
链接地址: http://www.djcxy.com/p/90632.html上一篇: 安卓