Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable GPS in Eclipse Emulator for Android [duplicate]

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!

like image 330
user1404924 Avatar asked Nov 30 '25 16:11

user1404924


2 Answers

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.

like image 174
Alexandru Cristescu Avatar answered Dec 02 '25 05:12

Alexandru Cristescu


You just need to send latitude and longitude via Emulator Control under DDMS, no need to other things. pretty simple:)

like image 42
Mahesh Avatar answered Dec 02 '25 06:12

Mahesh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!