How to emulate GPS location in the Android Emulator?

前端 未结 30 2358
天命终不由人
天命终不由人 2020-11-21 22:15

I want to get longitude and latitude in Android emulator for testing.

Can any one guide me how to achieve this?

How do I set the location of the emulator to

30条回答
  •  [愿得一人]
    2020-11-21 22:43

    In Mac, Linux or Cygwin:

    echo 'geo fix -99.133333 19.43333 2202' | nc localhost 5554
    

    That will put you in Mexico City. Change your longitude/latitude/altitude accordingly. That should be enough if you are not interested in nmea.

提交回复
热议问题