Class AndroidGeoLocation
- java.lang.Object
-
- io.appium.java_client.android.geolocation.AndroidGeoLocation
-
public class AndroidGeoLocation extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description AndroidGeoLocation()
Initializes AndroidLocation instance.AndroidGeoLocation(double latitude, double longitude)
Initializes AndroidLocation instance with longitude and latitude values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,?>
build()
Builds parameters map suitable for passing to the downstream API.AndroidGeoLocation
withAltitude(double altitude)
Sets geo altitude value.AndroidGeoLocation
withLatitude(double latitude)
Sets geo latitude value.AndroidGeoLocation
withLongitude(double longitude)
Sets geo longitude value.AndroidGeoLocation
withSatellites(int satellites)
Sets the number of geo satellites being tracked.AndroidGeoLocation
withSpeed(double speed)
Sets the movement speed.
-
-
-
Constructor Detail
-
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 Detail
-
withLongitude
public AndroidGeoLocation withLongitude(double longitude)
Sets geo longitude value. This value is required to set.- Parameters:
longitude
- geo longitude- Returns:
- self instance for chaining
-
withLatitude
public AndroidGeoLocation withLatitude(double latitude)
Sets geo latitude value. This value is required to set.- Parameters:
latitude
- geo latitude- Returns:
- self instance for chaining
-
withAltitude
public AndroidGeoLocation withAltitude(double altitude)
Sets geo altitude value.- Parameters:
altitude
- geo altitude- Returns:
- self instance for chaining
-
withSatellites
public AndroidGeoLocation withSatellites(int satellites)
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
public AndroidGeoLocation withSpeed(double speed)
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
public java.util.Map<java.lang.String,?> build()
Builds parameters map suitable for passing to the downstream API.- Returns:
- Parameters mapping
-
-