How to emulate GPS location in the Android Emulator?

前端 未结 30 2336
天命终不由人
天命终不由人 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:53

    In Linux where communication ports are blocked. navigate the terminal to platform-tools folder inside android sdk and fire this command:

    ./adb -s #{device_name} emu geo fix #{longitude} #{latitude}
    

提交回复
热议问题