setLocation not changing the location on the device

setLocation not changing the location on the device. The location() call shows the newly set location, but internally the location is not being set, that is verified via custom background service.

Tell a bit more. Your device is? How you see location not changed - what app?

Hi Aleksei, thanks for responding.

My device is Android, the app is Native: (Aliado Mensajeros Urbanos) and it is for messaging and addresses, when I perform setlocation, the gps location of the device does not change and the app requires that it change to be able to locate the messenger that will attend a service, yes This does not change in the device, the courier cannot take the service, nor mark stops for the attention of the same.

I require setlocation to do the same as FakeGPS does on my Android device.

Are you sure that app took location after not before you changed location?

Better restart app after you choose location for sure.

Also check appium logs in debug mode for any strangeā€¦

Hi Aleksei, thanks for responding.

The option to restart the application is not viable after doing stlocation, because it is a transaction that in the middle of this is that it is selected consumes the location of the messenger, is there another option without requiring restarting the app?

We need to understand problem first. Is it your app takes location before you setLocation or something other?

The application is run by a messenger who is changing location all the time:

How is its use:

  1. The messenger has the application open and the available services are shown there.

  2. When taking a service, the courier has to go initially to the location where the service will attend the first stop, this is where the GPS works. For the automation of tests that is required, we are not going to move with the device, for that reason today we use FakeGPS to simulate that we are in a location, and that is what we need to do with setlocation, in this case before registering that the messenger is in the location, with setlocation I send the latitude and longitude coordinates of the location, but the device is not taking them, if it is taking the ones it has in its real location, it is not possible at this time of the transaction to restart the application to do set location because it would lose it.