Zombie_Colonel
Zombie_Colonel

Reputation: 227

Geolocation on the emulator?

I develop an application that retrieves the location of the user.

Is that I can test on my emulator (of Eclipse) the geolocation with GPS or other?

thank you

Upvotes: 2

Views: 1129

Answers (3)

ACC
ACC

Reputation: 2570

You can connect to the emulator using telnet and then use the command geo fix <latitude> <longtitude> to simulate a change in latitude and longtitude

  1. Open a terminal in the /tools directory of your SDK's installation
  2. Connect to the emulator using telnet localhost <port number>. You will get the port number from the emulator window
  3. Use geo fix <x> <y> <z> to change the location. X and Y are latitude and longtitude in degrees and Z is altitude in meters (it's optional).

This page has details

Edit: Corrected and added more info

Upvotes: 4

Nikolay Elenkov
Nikolay Elenkov

Reputation: 52966

If you are using Eclipse, you can set long/lat in the Emulator control view, under 'Location controls'

Upvotes: 1

Roman Truba
Roman Truba

Reputation: 4401

Open DDMS perspective, select an emulator, then put in Location control any coordinates you need.

Upvotes: 1

Related Questions