0

I was wondering if there is any legitimate way of setting Espresso-based UI test location programmatically (please assume there is no adb access to device, there is no way to enable mock location from device settings). I don't think it's possible but posting the question in case I missed something.

PS.: I am using FusedLocationProvider if that matters.

ror
  • 3,295
  • 1
  • 19
  • 27

1 Answers1

1

Firebase Test Lab supports mocked locations. You'll probably need to install a location provider from your test package, e.g. Android mock location provider sample app is not working

See also How to mock location on device?

  • Thnx. First link says "You need to enable Allow mock locations within the Settings - Developer options" - this is not an option to me. 2nd link has various answers but imo it all ends up with "go to dev settings on the device". – ror Feb 06 '22 at 20:52
  • Add `android.permission.ACCESS_MOCK_LOCATION` to debug manifest – Konstantin Svist Feb 07 '22 at 21:10