Sending mock GPS locations from telnet on Windows 7

I was finding it awkward to send GPS mock locations to my emulator when I was debugging with eclipse. I looked up the command line version and it looks pretty nice.
I am using windows 7, so you need to enable the telnet client first.
Then start a command line (windows, not cygwin or something else). Enter this:
telnet localhost 5554
Entering help gives you a list of commands that you can send to your emulator. You can for example simulate calls. Very handy.

Enter this:
geo fix 10 20
where 10 and 20 in the example are latitude and longitude of a point you want to mock. This format takes altitude too, but it's optional.
Simple as that and a bit nicer than having to switch perspectives (ctrl-f8) in eclipse and then clicking the button - which has probably scrolled off the screen somewhere.
The telnet client text processing is a bit naff, no history or even cursor keys. Deleting does not work - does on the screen, but muck gets sent to the command processor and you have to start again. But I reckon all of that is amenable to a bit of fiddling. At the very least I can get a cygwin telnet client and work from there. Microsoft never were very big on command line love - despite Powershell's efforts if you are a total windows fanboy.

If you want to be really fancy, your emulator also understnads NMEA sentences. Although you would really want to need that quite badly before you bothered. A lot more complex than a simple geo fix.

Comments

Popular posts from this blog

Building a choropleth map for Irish agricultural data

Early Stopping with Keras

AutoCompleteTextView backed with data from SQLite in Android