Class AndroidGeoLocation
java.lang.Object
io.appium.java_client.android.geolocation.AndroidGeoLocation
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes AndroidLocation instance.AndroidGeoLocation(double latitude, double longitude) Initializes AndroidLocation instance with longitude and latitude values. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds parameters map suitable for passing to the downstream API.withAltitude(double altitude) Sets geo altitude value.withLatitude(double latitude) Sets geo latitude value.withLongitude(double longitude) Sets geo longitude value.withSatellites(int satellites) Sets the number of geo satellites being tracked.withSpeed(double speed) Sets the movement speed.
-
Constructor Details
-
AndroidGeoLocation
public AndroidGeoLocation()Initializes AndroidLocation instance. -
AndroidGeoLocation
public AndroidGeoLocation(double latitude, double longitude) Initializes AndroidLocation instance with longitude and latitude values.- Parameters:
latitude- latitude valuelongitude- longitude value
-
-
Method Details
-
withLongitude
Sets geo longitude value. This value is required to set.- Parameters:
longitude- geo longitude- Returns:
- self instance for chaining
-
withLatitude
Sets geo latitude value. This value is required to set.- Parameters:
latitude- geo latitude- Returns:
- self instance for chaining
-
withAltitude
Sets geo altitude value.- Parameters:
altitude- geo altitude- Returns:
- self instance for chaining
-
withSatellites
Sets the number of geo satellites being tracked. This number is respected on Emulators.- Parameters:
satellites- the count of satellites in range 1..12- Returns:
- self instance for chaining
-
withSpeed
Sets the movement speed. It is measured in meters/second for real devices and in knots for emulators.- Parameters:
speed- the actual speed, which should be greater than zero- Returns:
- self instance for chaining
-
build
Builds parameters map suitable for passing to the downstream API.- Returns:
- Parameters mapping
-