Class AndroidGeoLocation

java.lang.Object
io.appium.java_client.android.geolocation.AndroidGeoLocation

public class AndroidGeoLocation extends Object
  • 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 value
      longitude - longitude value
  • Method Details

    • 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 Map<String,?> build()
      Builds parameters map suitable for passing to the downstream API.
      Returns:
      Parameters mapping