How to emulate GPS location in the Android Emulator?

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

    I was unable to get a GPS fix on the emulator when emulator was running Android image without Google APIs. As soon as I changed the image to contain Google APIs all of the here mentioned ways to get a GPS fix worked.

    Make sure you select an image with Google APIs when creating AVD.

提交回复
热议问题