NOTE: Of late, I have been getting requests for very trivial problems that many of you are facing in your day-to-day work. This blog is not to solve your "project" problems - surely not a "Support" site.
I just love to share my knowledge in my spare time and would appreciate any questions or feedback on the articles and code I have shared. I also do appreciate thought-provoking questions that would lead me to write more articles and share.
But please do not put your day-to-day trivial problems here. Even if you do, you most probably would not get a response here.

Search This Blog


Monday, 26 October 2009

Simulate Location Change in Android Emulator

Start the Emulator
Start a command prompt
Start telnet
Then, type, o localhost 5554
This connects the telnet client to the android emulator (assuming emulator is running locally listening on port 5554. Else this connection fails)
Now type
geo fix 79.000000 13.000000 (or your latitude and longitude)
This sends the location change signal to the emulator.
NOTE: This is useful for applications built using Location APIs in Android and need to work with changes in location


  1. Do we get braodcast event when the location api changes

  2. Hi Deepa,

    It looks like there is a broadcast event when the location changes which can be obtained through the method: requestLocationUpdates (String provider, long minTime, float minDistance, PendingIntent intent)on LocationManager. The PendingIntent object would have the new location information.

    1. I tried to send latitude and longitude coordinates to android emulator thru both android console and the DDMS but when tried to retrieve thru phonegap Iam getting PositionError, could u suggest a solution for this

    2. Nothing output displayed in Emulator. i typed properly
      " geo fix 79.000000 13.000000 " after this, it shown " OK " in CMD window. its running... But nothing has been displayed in my emulator. where is the prob ??? I dont have much knowledge on telnet. please help me. (Even "gsm call 98765" and " sms send 5554 this is my message. " these are working. but GEO only not working. how can i get solution to this? can u give a solution madam ? )

      thanks in advance...