Nick Dong
Nick Dong

Reputation: 3736

adb -s emu geo fix not works without using telnet

My app works on Google Apis 17. I want to set the gps location after an emulator is being launched.

I try to this follow how-to-emulate-gps-location-in-the-android-emulator.

1st. get the serials number of the emulator.

>adb devices
emulator-5554

2nd run

adb -s emulator-5554 emu geo fix 121.4961236714487 31.24010934431376

There are no warnings and errors. I am programming on windows7.

It not work. However when I send gps info manually in eclipse(ADT22.6), it works. My app can locate the location correctly. What did eclipse do? How to make the adb command work? Thanks

Upvotes: 8

Views: 8319

Answers (2)

michael masse
michael masse

Reputation: 7

The command requires input of longitude latitude.

adb emu geo fix 41.4961236714487 271.24010934431376 KO: invalid latitude value. Should be in [-90,+90] range

Here's the string which works for me:

adb emu geo fix -71.2230 41.9067

Prior to reversing the input I was in Antarctica.

Upvotes: 0

joss
joss

Reputation: 39

Have you try sending it via telnet? First you have to connect to the emulator:

telnet localhost 5554

Then you can use the geo command to send latitude and logitude:

geo fix 121.4961236714487 31.24010934431376

Upvotes: 1

Related Questions