2

I'm running Espresso Android tests on a virtual device (Pixel2) of Firebase Test Lab and I need to know the geographic coordinates of this device. I have tests that fail because they must run on a device located in national territory (Portugal) and it's displayed the following: “Your access is being made outside Portugal". I would like to know if when I run the test via the command gcloud firebase test android run, there is a way to get access to the virtual device's location and / or to make it run on a device located in national territory (Portugal).

Thanks, xptoGirl

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
xptoGirl
  • 79
  • 1
  • 8

1 Answers1

2

The default GPS location for virtual devices is (37.779564,-122.391616) (as of November 2019). This spot is inside San Francisco, California. Note that you cannot change this location.

For physical devices you might not get a GPS location at all, or it can be anywhere in the world.

Your best bet is to mock the GPS location, e.g. take a look at this question.

Maik
  • 3,419
  • 1
  • 23
  • 34